* [PATCH v3 1/2] dt-bindings: iommu: arm-smmu: add sdm670 compatible
2022-11-03 23:26 [PATCH v3 0/2] iommu: SMMU for SDM670 Richard Acayan
@ 2022-11-03 23:26 ` Richard Acayan
2022-11-04 1:45 ` Krzysztof Kozlowski
2022-11-03 23:26 ` [PATCH v3 2/2] iommu: arm-smmu-qcom: " Richard Acayan
1 sibling, 1 reply; 4+ messages in thread
From: Richard Acayan @ 2022-11-03 23:26 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel, Rob Herring,
Krzysztof Kozlowski, Dmitry Baryshkov, Konrad Dybcio,
Bjorn Andersson, Sai Prakash Ranjan, Vinod Koul, Emma Anholt,
Rob Clark, linux-arm-kernel, iommu, devicetree
Cc: Richard Acayan
The Snapdragon 670 needs the IOMMU for GENI I2C. Add a compatible string in
the documentation to represent its support.
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
---
Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
index 796dc7d4dbdd..f77597e8ed39 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
@@ -39,6 +39,7 @@ properties:
- qcom,sc7280-smmu-500
- qcom,sc8180x-smmu-500
- qcom,sc8280xp-smmu-500
+ - qcom,sdm670-smmu-500
- qcom,sdm845-smmu-500
- qcom,sm6350-smmu-500
- qcom,sm6375-smmu-500
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH v3 2/2] iommu: arm-smmu-qcom: add sdm670 compatible
2022-11-03 23:26 [PATCH v3 0/2] iommu: SMMU for SDM670 Richard Acayan
2022-11-03 23:26 ` [PATCH v3 1/2] dt-bindings: iommu: arm-smmu: add sdm670 compatible Richard Acayan
@ 2022-11-03 23:26 ` Richard Acayan
1 sibling, 0 replies; 4+ messages in thread
From: Richard Acayan @ 2022-11-03 23:26 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel, Rob Herring,
Krzysztof Kozlowski, Dmitry Baryshkov, Konrad Dybcio,
Bjorn Andersson, Sai Prakash Ranjan, Vinod Koul, Emma Anholt,
Rob Clark, linux-arm-kernel, iommu, devicetree
Cc: Richard Acayan
The Snapdragon 670 needs the IOMMU for GENI I2C. Even though there is a
generic compatible string to support it, it still needs special
handling. The Adreno SMMU is separate, like Snapdragon 845, but the lack
of PCI on SDM670 makes a reset quirk unnecessary. Add a compatible
string to remove both built-in Adreno handling and reset quirk handling
in SDM670.
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
---
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index 3be81338a25b..89242aa2f29d 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -481,6 +481,13 @@ static const struct qcom_smmu_match_data qcom_smmu_data = {
.adreno_impl = &qcom_adreno_smmu_500_impl,
};
+static const struct qcom_smmu_match_data sdm670_smmu_500_data = {
+ /* SDM670 is the same as SDM845 except it doesn't have the reset quirk */
+ .impl = &qcom_smmu_500_impl,
+ /* No adreno impl, on sdm670 it is handled by separete sdm670-smmu-v2. */
+ /* No debug configuration */
+};
+
static const struct qcom_smmu_match_data sdm845_smmu_500_data = {
.impl = &sdm845_smmu_500_impl,
/* No adreno impl, on sdm845 it is handled by separete sdm845-smmu-v2. */
@@ -506,6 +513,7 @@ static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = {
{ .compatible = "qcom,sc8180x-smmu-500", .data = &qcom_smmu_500_impl0_data },
{ .compatible = "qcom,sc8280xp-smmu-500", .data = &qcom_smmu_500_impl0_data },
{ .compatible = "qcom,sdm630-smmu-v2", .data = &qcom_smmu_v2_data },
+ { .compatible = "qcom,sdm670-smmu-500", .data = &sdm670_smmu_500_data },
{ .compatible = "qcom,sdm845-smmu-v2", .data = &qcom_smmu_v2_data },
{ .compatible = "qcom,sdm845-smmu-500", .data = &sdm845_smmu_500_data },
{ .compatible = "qcom,sm6125-smmu-500", .data = &qcom_smmu_500_impl0_data },
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread