Add support for PDC interrupt controller for sm8150
Subsystems (8)
v2 cover Add support for PDC interrupt controller for sm8150
Changes since v1:
-----------------
- v1 can be found here: https://lore.kernel.org/linux-arm-msm/[email protected]/
- 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.
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(+)
Signature · 1 line
2.35.1
PATCH v2 1/4 dt-bindings: qcom,pdc: Add compatible for SM8150
Add the compatible string for SM8150 SoC from Qualcomm.
--- .../devicetree/bindings/interrupt-controller/qcom,pdc.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt +1 -0
@@ -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
Signature · 1 line
2.35.1
Re: [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150
Quoted 7 lines · Bhupesh Sharma
Add the compatible string for SM8150 SoC from Qualcomm.
Cc Bjorn Andersson <[email protected]>Cc Vinod Koul <[email protected]>Cc Marc Zyngier <[email protected]>Acked-by Rob Herring <[email protected]>Signed-off-by Bhupesh Sharma <[email protected]>
Quoted 19 lines
--- .../devicetree/bindings/interrupt-controller/qcom,pdc.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt +1
-0@@ -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 SM8350Signature · 1 line
2.35.1
Re: [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150
In reply to Bhupesh SharmaQuoted 7 lines · Bhupesh Sharma
Add the compatible string for SM8150 SoC from Qualcomm.
Cc Bjorn Andersson <[email protected]>Cc Vinod Koul <[email protected]>Cc Marc Zyngier <[email protected]>Acked-by Rob Herring <[email protected]>Signed-off-by Bhupesh Sharma <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH v2 2/4 pinctrl: qcom: sm8150: Specify PDC map
In reply to Bhupesh SharmaSpecify the PDC mapping for SM8150, so that gpio interrupts are properly mapped to the wakeup IRQs of the PDC.
--- drivers/pinctrl/qcom/pinctrl-sm8150.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/pinctrl/qcom/pinctrl-sm8150.c +22 -0
@@ -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)
Signature · 1 line
2.35.1
Re: [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map
Quoted 7 lines · Bhupesh Sharma
Specify the PDC mapping for SM8150, so that gpio interrupts are properly mapped to the wakeup IRQs of the PDC.
Cc Maulik Shah <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Linus Walleij <[email protected]>Signed-off-by Bhupesh Sharma <[email protected]>
Regards,
Bjorn
Quoted 47 lines
--- drivers/pinctrl/qcom/pinctrl-sm8150.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)drivers/pinctrl/qcom/pinctrl-sm8150.c +22
-0@@ -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)Signature · 1 line
2.35.1
Re: [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map
In reply to Bhupesh SharmaQuoted 7 lines · Bhupesh Sharma
Specify the PDC mapping for SM8150, so that gpio interrupts are properly mapped to the wakeup IRQs of the PDC.
Cc Maulik Shah <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Linus Walleij <[email protected]>Signed-off-by Bhupesh Sharma <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH v2 3/4 arm64: dts: qcom: sm8150: Add pdc interrupt controller node
In reply to Bhupesh SharmaAdd pdc interrupt controller for sm8150.
--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +10 -0
@@ -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";
Signature · 1 line
2.35.1
Re: [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node
Quoted 16 lines · Bhupesh Sharma
Add pdc interrupt controller for sm8150.
Cc Maulik Shah <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Vinod Koul <[email protected]>Cc Rob Herring <[email protected]>Signed-off-by Bhupesh Sharma <[email protected]>--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm64/boot/dts/qcom/sm8150.dtsi +0
-0
arch/arm64/boot/dts/qcom/sm8150.dtsi system-cache-controller@9200000 { · line 1633
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +5
-0@@ -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
Quoted 11 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +5
-0+ #interrupt-cells = <2>; + interrupt-parent = <&intc>; + interrupt-controller; + }; + ufs_mem_hc: ufshc@1d84000 { compatible = "qcom,sm8150-ufshc", "qcom,ufshc", "jedec,ufs-2.0";Signature · 1 line
2.35.1
Re: [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node
Hi Bjorn,
Thanks for your review.
Quoted 31 lines · Bjorn Andersson
Quoted 16 lines · Bhupesh Sharma
Add pdc interrupt controller for sm8150.
Cc Maulik Shah <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Vinod Koul <[email protected]>Cc Rob Herring <[email protected]>Signed-off-by Bhupesh Sharma <[email protected]>--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm64/boot/dts/qcom/sm8150.dtsi +0
-0arch/arm64/boot/dts/qcom/sm8150.dtsi system-cache-controller@9200000 { · line 1633
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +5
-0@@ -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>;
Quoted 1 line
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
Quoted 11 lines
Quoted 11 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +5
-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
Re: [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node
Quoted 37 lines · Bhupesh Sharma
Hi Bjorn,
Thanks for your review.
Quoted 31 lines · Bjorn Andersson
Quoted 16 lines · Bhupesh Sharma
Add pdc interrupt controller for sm8150.
Cc Maulik Shah <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Vinod Koul <[email protected]>Cc Rob Herring <[email protected]>Signed-off-by Bhupesh Sharma <[email protected]>--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm64/boot/dts/qcom/sm8150.dtsi +0
-0arch/arm64/boot/dts/qcom/sm8150.dtsi system-cache-controller@9200000 { · line 1633
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +5
-0@@ -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>;
Quoted 8 lines
Quoted 1 line
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
Quoted 14 lines
Thanks,
BhupeshQuoted 11 lines
Quoted 11 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +5
-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
PATCH v2 4/4 arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm
In reply to Bhupesh SharmaSeveral 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.
--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -0
@@ -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 {
Signature · 1 line
2.35.1
Re: [PATCH v2 4/4] arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm
Quoted 10 lines · Bhupesh Sharma
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 <[email protected]>Cc Vinod Koul <[email protected]>Cc Rob Herring <[email protected]>Signed-off-by Bhupesh Sharma <[email protected]>
Quoted 19 lines
--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm64/boot/dts/qcom/sm8150.dtsi +1
-0@@ -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 {Signature · 1 line
2.35.1
Quoted 5 lines · Bhupesh Sharma
Changes since v1:
-----------------
- v1 can be found here: https://lore.kernel.org/linux-arm-msm/[email protected]/
- 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
Quoted 11 lines · Bhupesh Sharma
Changes since v1:
-----------------
- v1 can be found here: https://lore.kernel.org/linux-arm-msm/[email protected]/
- 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.
Signature · 1 line
~Vinod
This series was applied to qcom/linux.git (for-next) by Bjorn Andersson <[email protected]>:
Hello:
This series was applied to qcom/linux.git (for-next) by Bjorn Andersson <[email protected]>:
Quoted 10 lines · On Sun, 27 Feb 2022 00:10:24 +0530 you wrote:
Changes since v1:
-----------------
- v1 can be found here: https://lore.kernel.org/linux-arm-msm/[email protected]/
- 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 is the summary with links:
- [v2,1/4] dt-bindings: qcom,pdc: Add compatible for SM8150 (no matching commit)
- [v2,2/4] pinctrl: qcom: sm8150: Specify PDC map
(no matching commit)
- [v2,3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node
https://git.kernel.org/qcom/c/a88c86f831a7
- [v2,4/4] arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm (no matching commit)
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html