Enable smmu support on sdm845
Subsystems (5)
v4 cover Enable smmu support on sdm845
This series enables apps-smmu, the "arm,mmu-500" instance
on sdm845.
Series tested on SDM845 MTP device with related smmu patch series [1], and necessary config change, besides one hack to keep LDO14 in LPM mode to boot things up (see the commit in the test branch).
The tested branch is available at [2].
Changes since v3:
- Refined the dt binding documentation more to align with Rob's comments for qcom,smmu-v2 binding documentation [3] on SoC specific compatibles and state things similar to qcom,smmu-v2 [4].
Changes since v2:
- Dropped patch for gpu-smmu [5] as the same has been pushed by Jordan [6] after incorporating the dt binding update.
- Updated binding doc to include valid value for '<soc>' in "qcom,<soc>-smmu-500" compatible string.
Changes since v1:
- Addressed Rob's review comments by adding a SoC specific compatible. Have added a new dt-bindings patch for this.
- Updated node name to 'iommu'.
- Addressed Doug's review comment about removing status property from smmu's nodes, as smmu is either present on the soc or not. Enabling it is not a board-level decision.
[1] https://patchwork.kernel.org/cover/10581891/
[2] https://github.com/vivekgautam1/linux/commits/v4.19-rc7/sdm845-smmu-dt
[3] https://patchwork.kernel.org/patch/10576937/
[4] https://patchwork.kernel.org/patch/10581911/
[5] https://patchwork.kernel.org/patch/10565295/
[6] https://patchwork.kernel.org/patch/10577297/
Vivek Gautam (2):
dt-bindings: arm-smmu: Add binding doc for Qcom smmu-500
dts: arm64/sdm845: Add node for arm,mmu-500
.../devicetree/bindings/iommu/arm,smmu.txt | 4 ++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 72 ++++++++++++++++++++++ 2 files changed, 76 insertions(+)
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH v4 1/2 dt-bindings: arm-smmu: Add binding doc for Qcom smmu-500
Qcom's implementation of arm,mmu-500 works well with current arm-smmu driver implementation. Adding a soc specific compatible along with arm,mmu-500 makes the bindings future safe.
---
Changes since v3:
- Refined language more to state things directly for the bindings description.
Documentation/devicetree/bindings/iommu/arm,smmu.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/iommu/arm,smmu.txt +4 -0
@@ -27,6 +27,10 @@ conditions. "qcom,msm8996-smmu-v2", "qcom,smmu-v2", "qcom,sdm845-smmu-v2", "qcom,smmu-v2". + Qcom SoCs implementing "arm,mmu-500" must also include, + as below, SoC-specific compatibles: + "qcom,sdm845-smmu-500", "arm,mmu-500" + - reg : Base address and size of the SMMU. - #global-interrupts : The number of global interrupts exposed by the
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH v4 1/2] dt-bindings: arm-smmu: Add binding doc for Qcom smmu-500
Quoted 5 lines · Vivek Gautam
Qcom's implementation of arm,mmu-500 works well with current arm-smmu driver implementation. Adding a soc specific compatible along with arm,mmu-500 makes the bindings future safe.
Signed-off-by Vivek Gautam <[email protected]>
Quoted 9 lines
---
Changes since v3:
- Refined language more to state things directly for the bindings description.Documentation/devicetree/bindings/iommu/arm,smmu.txt | 4 ++++ 1 file changed, 4 insertions(+)
Re: [PATCH v4 1/2] dt-bindings: arm-smmu: Add binding doc for Qcom smmu-500
Quoted 8 lines · Rob Herring
Quoted 7 lines · Vivek Gautam
Qcom's implementation of arm,mmu-500 works well with current arm-smmu driver implementation. Adding a soc specific compatible along with arm,mmu-500 makes the bindings future safe.
Signed-off-by Vivek Gautam <[email protected]>---
Quoted 8 lines
Quoted 7 lines
Changes since v3:
- Refined language more to state things directly for the bindings description.Documentation/devicetree/bindings/iommu/arm,smmu.txt | 4 ++++ 1 file changed, 4 insertions(+)Reviewed-by Rob Herring <[email protected]>
Thank you Rob.
Best regards
Vivek
Re: [PATCH v4 1/2] dt-bindings: arm-smmu: Add binding doc for Qcom smmu-500
Hi Will,
Quoted 16 lines · Vivek Gautam
Quoted 12 lines · Rob Herring
Quoted 11 lines · Vivek Gautam
Qcom's implementation of arm,mmu-500 works well with current arm-smmu driver implementation. Adding a soc specific compatible along with arm,mmu-500 makes the bindings future safe.
Signed-off-by Vivek Gautam <[email protected]>---
Changes since v3:
- Refined language more to state things directly for the bindings description.
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Documentation/devicetree/bindings/iommu/arm,smmu.txt | 4 ++++ 1 file changed, 4 insertions(+)Reviewed-by Rob Herring <[email protected]>Thank you Rob.
Can you please pick this one as well to your tree? This goes on top of the bindings patch for "qcom,smmu-v2". So, it can't go through Andy's tree. Will ask Andy to pick the second patch of the series, that adds the dt node.
I guess as I sent this one along with the dt patch, I would have mistakenly added
you to 'cc' list rather than 'to' list.
Let me know if you would like me to resend it.
Thank
Vivek
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH v4 1/2] dt-bindings: arm-smmu: Add binding doc for Qcom smmu-500
Quoted 23 lines · Vivek Gautam
Quoted 13 lines · Vivek Gautam
Quoted 12 lines · Rob Herring
Quoted 11 lines · Vivek Gautam
Qcom's implementation of arm,mmu-500 works well with current arm-smmu driver implementation. Adding a soc specific compatible along with arm,mmu-500 makes the bindings future safe.
Signed-off-by Vivek Gautam <[email protected]>---
Changes since v3:
- Refined language more to state things directly for the bindings description.Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Documentation/devicetree/bindings/iommu/arm,smmu.txt | 4 ++++ 1 file changed, 4 insertions(+)Reviewed-by Rob Herring <[email protected]>Thank you Rob.
Quoted 8 lines
Can you please pick this one as well to your tree? This goes on top of the bindings patch for "qcom,smmu-v2". So, it can't go through Andy's tree. Will ask Andy to pick the second patch of the series, that adds the dt node.
I guess as I sent this one along with the dt patch, I would have mistakenly added
you to 'cc' list rather than 'to' list.
Let me know if you would like me to resend it.
I've already sent my stuff to Joerg, so it's too late for 4.21. Perhaps resend this patch standalone to Joerg with me on CC so that I can ack it.
Will
PATCH v4 2/2 dts: arm64/sdm845: Add node for arm,mmu-500
In reply to Vivek GautamAdd device node for arm,mmu-500 available on sdm845. This MMU-500 with single TCU and multiple TBU architecture is shared among all the peripherals except gpu.
---
Changes since v3:
- none.
arch/arm64/boot/dts/qcom/sdm845.dtsi | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +72 -0
@@ -1297,6 +1297,78 @@ cell-index = <0>; }; + apps_smmu: iommu@15000000 { + compatible = "qcom,sdm845-smmu-500", "arm,mmu-500"; + reg = <0x15000000 0x80000>; + #iommu-cells = <2>; + #global-interrupts = <1>; + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, + <GIC_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331 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>; + }; + apss_shared: mailbox@17990000 { compatible = "qcom,sdm845-apss-shared"; reg = <0x17990000 0x1000>;
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH v4 2/2] dts: arm64/sdm845: Add node for arm,mmu-500
Quoted 4 lines · Vivek Gautam
Add device node for arm,mmu-500 available on sdm845. This MMU-500 with single TCU and multiple TBU architecture is shared among all the peripherals except gpu.
Hi Vivek,
Applying this patch together with UFS ([1] and [2]) ontop of v5.0-rc1 causes my MTP reboot once the UFSHCD module is inserted and probed. Independently the patches seems to work fine.
Do you have any suggestion to why this would be?
[1] https://lore.kernel.org/lkml/20181210192826.241350-4-evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org/
[2] https://lore.kernel.org/lkml/20181210192826.241350-5-evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org/
Regards,
Bjorn
Quoted 96 lines
Signed-off-by Vivek Gautam <[email protected]>---
Changes since v3:
- none.arch/arm64/boot/dts/qcom/sdm845.dtsi | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)arch/arm64/boot/dts/qcom/sdm845.dtsi +72
-0@@ -1297,6 +1297,78 @@ cell-index = <0>; }; + apps_smmu: iommu@15000000 { + compatible = "qcom,sdm845-smmu-500", "arm,mmu-500"; + reg = <0x15000000 0x80000>; + #iommu-cells = <2>; + #global-interrupts = <1>; + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 182 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_TYPE_LEVEL_HIGH>, + <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>; + }; + apss_shared: mailbox@17990000 { compatible = "qcom,sdm845-apss-shared"; reg = <0x17990000 0x1000>;Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH v4 2/2] dts: arm64/sdm845: Add node for arm,mmu-500
Quoted 6 lines · Bjorn Andersson
Quoted 4 lines · Vivek Gautam
Add device node for arm,mmu-500 available on sdm845. This MMU-500 with single TCU and multiple TBU architecture is shared among all the peripherals except gpu.
Quoted 7 lines
Hi Vivek,
Applying this patch together with UFS ([1] and [2]) ontop of v5.0-rc1 causes my MTP reboot once the UFSHCD module is inserted and probed. Independently the patches seems to work fine.
Do you have any suggestion to why this would be?
Hi Bjorn,
Enabling SMMU on sdm845 when you have UFS also enabled, would need addition of 'iommus' property to ufs dt node.
You will need to add the following with ufs:
iommus = <&apps_smmu 0x100 0xf>;
Thanks
Vivek
Quoted 103 lines
[1] https://lore.kernel.org/lkml/20181210192826.241350-4-evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org/
[2] https://lore.kernel.org/lkml/20181210192826.241350-5-evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org/Regards,
BjornQuoted 96 lines
Signed-off-by Vivek Gautam <[email protected]>---
Changes since v3:
- none.arch/arm64/boot/dts/qcom/sdm845.dtsi | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)arch/arm64/boot/dts/qcom/sdm845.dtsi +72
-0@@ -1297,6 +1297,78 @@ cell-index = <0>; }; + apps_smmu: iommu@15000000 { + compatible = "qcom,sdm845-smmu-500", "arm,mmu-500"; + reg = <0x15000000 0x80000>; + #iommu-cells = <2>; + #global-interrupts = <1>; + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 181 IRQ_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_LEVEL_HIGH>, + <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>; + }; + apss_shared: mailbox@17990000 { compatible = "qcom,sdm845-apss-shared"; reg = <0x17990000 0x1000>;Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH v4 2/2] dts: arm64/sdm845: Add node for arm,mmu-500
Quoted 17 lines · Vivek Gautam
Quoted 6 lines · Bjorn Andersson
Quoted 4 lines · Vivek Gautam
Add device node for arm,mmu-500 available on sdm845. This MMU-500 with single TCU and multiple TBU architecture is shared among all the peripherals except gpu.
Quoted 7 lines
Hi Vivek,
Applying this patch together with UFS ([1] and [2]) ontop of v5.0-rc1 causes my MTP reboot once the UFSHCD module is inserted and probed. Independently the patches seems to work fine.
Do you have any suggestion to why this would be?
Quoted 9 lines
Hi Bjorn,
Enabling SMMU on sdm845 when you have UFS also enabled, would need addition of
'iommus' property to ufs dt node.
You will need to add the following with ufs:iommus = <
&apps_smmu0x1000xf>;
Thanks, this do address the sudden restart of my MTP, but provides a fault.
[ 7.391117] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0xffffdf3e0, fsynr=0x290000, cb=0 [ 7.747406] ufshcd-qcom 1d84000.ufshc: ufshcd_verify_dev_init: NOP OUT failed -11
The only thing done ontop of v5.0-rc1, is to take your patch adding apps_smmu, add the ufs nodes as Evan proposed and specify iommus in the ufshcd node.
With Coreboot UFS seems to work without specifying iommus, but with it UFS fails to come up.
Regards,
Bjorn
Quoted 105 lines
Thanks
VivekQuoted 102 lines
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/Regards,
BjornQuoted 95 lines
Signed-off-by Vivek Gautam <[email protected]>---
Changes since v3:
- none.arch/arm64/boot/dts/qcom/sdm845.dtsi | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)arch/arm64/boot/dts/qcom/sdm845.dtsi +72
-1@@ -1297,6 +1297,78 @@ cell-index = <0>; }; + apps_smmu: iommu@15000000 { + compatible = "qcom,sdm845-smmu-500", "arm,mmu-500"; + reg = <0x15000000 0x80000>; + #iommu-cells = <2>; + #global-interrupts = <1>; + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 112 I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TYPE_LEVEL_HIGH>, + <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>; + }; + apss_shared: mailbox@17990000 { compatible = "qcom,sdm845-apss-shared"; reg = <0x17990000 0x1000>; --QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Hi Vivek,
Quoted 6 lines · Vivek Gautam
This series enables apps-smmu, the "arm,mmu-500" instance
on sdm845.
Series tested on SDM845 MTP device with related smmu patch series [1], and necessary config change, besides one hack to keep LDO14 in LPM mode to boot things up (see the commit in the test branch).
The tested branch is available at [2].
[...]
Quoted 3 lines
.../devicetree/bindings/iommu/arm,smmu.txt | 4 ++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 72 ++++++++++++++++++++++ 2 files changed, 76 insertions(+)
Given that this doesn't touch any of the driver code, please take this via the Andy and arm-soc.
Will
Hi Will,
Quoted 9 lines · Will Deacon
Hi Vivek,
Quoted 6 lines · Vivek Gautam
This series enables apps-smmu, the "arm,mmu-500" instance
on sdm845.
Series tested on SDM845 MTP device with related smmu patch series [1], and necessary config change, besides one hack to keep LDO14 in LPM mode to boot things up (see the commit in the test branch).
The tested branch is available at [2].
Quoted 7 lines
[...]
Quoted 3 lines
.../devicetree/bindings/iommu/arm,smmu.txt | 4 ++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 72 ++++++++++++++++++++++ 2 files changed, 76 insertions(+)Given that this doesn't touch any of the driver code, please take this via the Andy and arm-soc.
Yea, once the driver changes are pulled in your tree, I can ask Andy to pick these. Thanks
Best regards
Vivek
Quoted 2 lines
Will