From: Vivek Gautam <vivek.gautam@codeaurora.org>
To: iommu@lists.linux-foundation.org, joro@8bytes.org, robin.murphy@arm.com
Cc: tfiga@chromium.org, Vivek Gautam <vivek.gautam@codeaurora.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Will Deacon <will.deacon@arm.com>,
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
FLATTENED DEVICE TREE BINDINGS),
linux-kernel@vger.kernel.org (open list),
linux-arm-kernel@lists.infradead.org (moderated list:ARM SMMU
DRIVERS)
Subject: [PATCH 1/1] iommu/arm-smmu: Add support for qcom,smmu-500 variant
Date: Wed, 7 Mar 2018 12:02:19 +0530 [thread overview]
Message-ID: <20180307063219.14409-1-vivek.gautam@codeaurora.org> (raw)
Qualcomm's arm-smmu 500 implementation supports runtime pm
so enable the same.
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
---
Based on iommu/arm-smmu pm runtime support series [1]:
[PATCH v8 0/5] iommu/arm-smmu: Add runtime pm/sleep support
Tested on sdm845 with necessary support to enable the smmu
and with necessary user.
[1] https://lkml.org/lkml/2018/3/2/325
Documentation/devicetree/bindings/iommu/arm,smmu.txt | 14 ++++++++++++++
drivers/iommu/arm-smmu.c | 8 ++++++++
2 files changed, 22 insertions(+)
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.txt b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
index 6ea27bd4f785..0b5c6d2a9865 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.txt
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
@@ -18,6 +18,7 @@ conditions.
"arm,mmu-500"
"cavium,smmu-v2"
"qcom,<soc>-smmu-v2", "qcom,smmu-v2"
+ "qcom,<soc>-smmu-500", "qcom,smmu-500"
depending on the particular implementation and/or the
version of the architecture implemented.
@@ -30,6 +31,10 @@ conditions.
An example string would be -
"qcom,msm8996-smmu-v2", "qcom,smmu-v2".
+ "qcom,smmu-500" is arm,mmu-500 implementation that supports
+ efficient power management by supporting smmu's state
+ retention.
+
- reg : Base address and size of the SMMU.
- #global-interrupts : The number of global interrupts exposed by the
@@ -179,3 +184,12 @@ conditions.
<&mmcc SMMU_MDP_AHB_CLK>;
clock-names = "bus", "iface";
};
+
+ smmu5: iommu {
+ compatible = "qcom,sdm845-smmu-500", "qcom,smmu-500";
+ reg = <0x15000000 0x80000>;
+ #iommu-cells = <2>;
+ #global-interrupts = <1>;
+
+ ...
+ };
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 7a96c924ae22..7f52456c6b25 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -2008,6 +2008,12 @@ static const char * const qcom_smmuv2_clks[] = {
"bus", "iface",
};
+static const struct arm_smmu_match_data qcom_smmu500 = {
+ .version = ARM_SMMU_V2,
+ .model = ARM_MMU500,
+ .rpm_supported = true,
+};
+
static const struct arm_smmu_match_data qcom_smmuv2 = {
.version = ARM_SMMU_V2,
.model = QCOM_SMMUV2,
@@ -2024,6 +2030,7 @@ static const struct of_device_id arm_smmu_of_match[] = {
{ .compatible = "arm,mmu-500", .data = &arm_mmu500 },
{ .compatible = "cavium,smmu-v2", .data = &cavium_smmuv2 },
{ .compatible = "qcom,smmu-v2", .data = &qcom_smmuv2 },
+ { .compatible = "qcom,smmu-500", .data = &qcom_smmu500 },
{ },
};
MODULE_DEVICE_TABLE(of, arm_smmu_of_match);
@@ -2394,6 +2401,7 @@ IOMMU_OF_DECLARE(arm_mmu401, "arm,mmu-401");
IOMMU_OF_DECLARE(arm_mmu500, "arm,mmu-500");
IOMMU_OF_DECLARE(cavium_smmuv2, "cavium,smmu-v2");
IOMMU_OF_DECLARE(qcom_smmuv2, "qcom,smmu-v2");
+IOMMU_OF_DECLARE(qcom_smmu500, "qcom,smmu-500");
MODULE_DESCRIPTION("IOMMU API for ARM architected SMMU implementations");
MODULE_AUTHOR("Will Deacon <will.deacon@arm.com>");
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
next reply other threads:[~2018-03-07 6:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 6:32 Vivek Gautam [this message]
2018-03-07 16:30 ` [PATCH 1/1] iommu/arm-smmu: Add support for qcom,smmu-500 variant Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180307063219.14409-1-vivek.gautam@codeaurora.org \
--to=vivek.gautam@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=tfiga@chromium.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).