linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] iommu: SMMU for SDM670
@ 2022-11-03 23:26 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 ` [PATCH v3 2/2] iommu: arm-smmu-qcom: " Richard Acayan
  0 siblings, 2 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

Changes since v2:
 - rewrite driver patch (2/2)
 - rebase on (1/2):
   https://lore.kernel.org/linux-iommu/20221102184420.534094-1-dmitry.baryshkov@linaro.org/
 - reset review process (1-2/2)

Changes since v1 (no emails related to this series since last week):
 - accumulate tags (both were added because it seems like the discussion
   ended in agreement to keep adding compatible strings to the driver)

This adds the compatible string for the Qualcomm Snapdragon 670's SMMU. The
SMMU is necessary for GENI I2C, included in initial bringup because it
doesn't need non-trivial patches except for patches conventionally added
before the initial device tree (global clock controller and pinctrl).

Richard Acayan (2):
  dt-bindings: iommu: arm-smmu: add sdm670 compatible
  iommu: arm-smmu-qcom: add sdm670 compatible

 Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 +
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c            | 8 ++++++++
 2 files changed, 9 insertions(+)

-- 
2.38.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 1/2] dt-bindings: iommu: arm-smmu: add sdm670 compatible
  2022-11-03 23:26 ` [PATCH v3 1/2] dt-bindings: iommu: arm-smmu: add sdm670 compatible Richard Acayan
@ 2022-11-04  1:45   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-04  1:45 UTC (permalink / raw)
  To: Richard Acayan, 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

On 03/11/2022 19:26, Richard Acayan wrote:
> 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>

There is ongoing rework of these bindings, so something needs rebase,
but FWIW:

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-04  1:45   ` Krzysztof Kozlowski
2022-11-03 23:26 ` [PATCH v3 2/2] iommu: arm-smmu-qcom: " Richard Acayan

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