Skip to contentSkip to conversation

SDM670 GPI DMA support

PATCH Superseded Richard Acayan 3 participants 10 messages Sep 27, 2022 – Sep 29, 2022

Subsystems (4)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 cover SDM670 GPI DMA support

Changes since v2:
- change fallback to sdm845 compat string (and keep compat string in driver)
- fallback now only affects two SoCs + SDM670

Changes since v1:
- add fallback compatible

This patch series adds the compatible string for GPI DMA, needed for the GENI interface, on Snapdragon 670.

Richard Acayan (4):
dt-bindings: dma: qcom: gpi: add fallback compatible
dt-bindings: dma: qcom: gpi: add compatible for sdm670
arm64: dts: qcom: add gpi-dma fallback compatible
dmaengine: qcom: gpi: drop redundant of_device_id entries

 .../devicetree/bindings/dma/qcom,gpi.yaml     | 22 ++++++++++++-------
 arch/arm64/boot/dts/qcom/sm8150.dtsi          |  6 ++---
 arch/arm64/boot/dts/qcom/sm8250.dtsi          |  6 ++---
 drivers/dma/qcom/gpi.c                        |  2 --
 4 files changed, 20 insertions(+), 16 deletions(-)
Signature · 1 line
2.37.3
#1 lore raw

PATCH v3 1/4 dt-bindings: dma: qcom: gpi: add fallback compatible

The drivers are transitioning from matching against lists of specific compatible strings to matching against smaller lists of more generic compatible strings. Use the SDM845 compatible string as a fallback in the schema to support this change.

---
 .../devicetree/bindings/dma/qcom,gpi.yaml     | 21 ++++++++++++-------
 1 file changed, 13 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/dma/qcom,gpi.yaml +13 -8
index eabf8a76d3a0..081b8a2d393d 100644
@@ -18,14 +18,19 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - qcom,sc7280-gpi-dma
-      - qcom,sdm845-gpi-dma
-      - qcom,sm6350-gpi-dma
-      - qcom,sm8150-gpi-dma
-      - qcom,sm8250-gpi-dma
-      - qcom,sm8350-gpi-dma
-      - qcom,sm8450-gpi-dma
+    oneOf:
+      - enum:
+          - qcom,sc7280-gpi-dma
+          - qcom,sdm845-gpi-dma
+          - qcom,sm6350-gpi-dma
+          - qcom,sm8350-gpi-dma
+          - qcom,sm8450-gpi-dma
+
+      - items:
+          - enum:
+              - qcom,sm8150-gpi-dma
+              - qcom,sm8250-gpi-dma
+          - const: qcom,sdm845-gpi-dma
 
   reg:
     maxItems: 1
Signature · 1 line
2.37.3
Reviewed-by on v3 1/4
#2 lore raw

Re: [PATCH v3 1/4] dt-bindings: dma: qcom: gpi: add fallback compatible

Quoted 7 lines · Richard Acayan

The drivers are transitioning from matching against lists of specific compatible strings to matching against smaller lists of more generic compatible strings. Use the SDM845 compatible string as a fallback in the schema to support this change.

---

Best regards,
Krzysztof

#3 lore raw

PATCH v3 2/4 dt-bindings: dma: qcom: gpi: add compatible for sdm670

In reply to Richard Acayan

The Snapdragon 670 uses GPI DMA for its GENI interface. Add a compatible string for it in the documentation.

---
 Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/dma/qcom,gpi.yaml +1 -0
index 081b8a2d393d..750b40c32213 100644
@@ -28,6 +28,7 @@ properties:
 
       - items:
           - enum:
+              - qcom,sdm670-gpi-dma
               - qcom,sm8150-gpi-dma
               - qcom,sm8250-gpi-dma
           - const: qcom,sdm845-gpi-dma
Signature · 1 line
2.37.3
#5 lore raw

PATCH v3 3/4 arm64: dts: qcom: add gpi-dma fallback compatible

In reply to Richard Acayan

The dt schema for gpi-dma has been updated with a new fallback compatible string. Add the compatible strings to existing device trees.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 6 +++---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/qcom/sm8150.dtsi +3 -3
index cef8c4f4f0ff..281d5109ac3b 100644
@@ -887,7 +887,7 @@ gcc: clock-controller@100000 {
 		};
 
 		gpi_dma0: dma-controller@800000 {
-			compatible = "qcom,sm8150-gpi-dma";
+			compatible = "qcom,sm8150-gpi-dma", "qcom,sdm845-gpi-dma";
 			reg = <0 0x800000 0 0x60000>;
 			interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>,
@@ -1222,7 +1222,7 @@ spi7: spi@89c000 {
 		};
 
 		gpi_dma1: dma-controller@a00000 {
-			compatible = "qcom,sm8150-gpi-dma";
+			compatible = "qcom,sm8150-gpi-dma", "qcom,sdm845-gpi-dma";
 			reg = <0 0xa00000 0 0x60000>;
 			interrupts = <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>,
@@ -1471,7 +1471,7 @@ spi16: spi@a94000 {
 		};
 
 		gpi_dma2: dma-controller@c00000 {
-			compatible = "qcom,sm8150-gpi-dma";
+			compatible = "qcom,sm8150-gpi-dma", "qcom,sdm845-gpi-dma";
 			reg = <0 0xc00000 0 0x60000>;
 			interrupts = <GIC_SPI 588 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 589 IRQ_TYPE_LEVEL_HIGH>,
arch/arm64/boot/dts/qcom/sm8250.dtsi +3 -3
index a5b62cadb129..5d5de7eead08 100644
@@ -936,7 +936,7 @@ rng: rng@793000 {
 		};
 
 		gpi_dma2: dma-controller@800000 {
-			compatible = "qcom,sm8250-gpi-dma";
+			compatible = "qcom,sm8250-gpi-dma", "qcom,sdm845-gpi-dma";
 			reg = <0 0x00800000 0 0x70000>;
 			interrupts = <GIC_SPI 588 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 589 IRQ_TYPE_LEVEL_HIGH>,
@@ -1187,7 +1187,7 @@ spi19: spi@894000 {
 		};
 
 		gpi_dma0: dma-controller@900000 {
-			compatible = "qcom,sm8250-gpi-dma";
+			compatible = "qcom,sm8250-gpi-dma", "qcom,sdm845-gpi-dma";
 			reg = <0 0x00900000 0 0x70000>;
 			interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>,
@@ -1505,7 +1505,7 @@ spi7: spi@99c000 {
 		};
 
 		gpi_dma1: dma-controller@a00000 {
-			compatible = "qcom,sm8250-gpi-dma";
+			compatible = "qcom,sm8250-gpi-dma", "qcom,sdm845-gpi-dma";
 			reg = <0 0x00a00000 0 0x70000>;
 			interrupts = <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>,
Signature · 1 line
2.37.3
#7 lore raw

PATCH v3 4/4 dmaengine: qcom: gpi: drop redundant of_device_id entries

In reply to Richard Acayan

The drivers are transitioning from matching against lists of specific compatible strings to matching against smaller lists of more generic compatible strings. Continue the transition in the GPI DMA driver.

---
 drivers/dma/qcom/gpi.c | 2 --
 1 file changed, 2 deletions(-)
drivers/dma/qcom/gpi.c +0 -2
index 89839864b4ec..e5f37d61f30a 100644
@@ -2289,8 +2289,6 @@ static const struct of_device_id gpi_of_match[] = {
 	{ .compatible = "qcom,sc7280-gpi-dma", .data = (void *)0x10000 },
 	{ .compatible = "qcom,sdm845-gpi-dma", .data = (void *)0x0 },
 	{ .compatible = "qcom,sm6350-gpi-dma", .data = (void *)0x10000 },
-	{ .compatible = "qcom,sm8150-gpi-dma", .data = (void *)0x0 },
-	{ .compatible = "qcom,sm8250-gpi-dma", .data = (void *)0x0 },
 	{ .compatible = "qcom,sm8350-gpi-dma", .data = (void *)0x10000 },
 	{ .compatible = "qcom,sm8450-gpi-dma", .data = (void *)0x10000 },
 	{ },
Signature · 1 line
2.37.3
#8 lore raw

Re: [PATCH v3 4/4] dmaengine: qcom: gpi: drop redundant of_device_id entries

Quoted 14 lines · Richard Acayan

The drivers are transitioning from matching against lists of specific compatible strings to matching against smaller lists of more generic compatible strings. Continue the transition in the GPI DMA driver.

---
 drivers/dma/qcom/gpi.c | 2 --
 1 file changed, 2 deletions(-)
drivers/dma/qcom/gpi.c +0 -0
index 89839864b4ec..e5f37d61f30a 100644

drivers/dma/qcom/gpi.c static const struct of_device_id gpi_of_match[] = { · line 2293

Quoted 5 lines
drivers/dma/qcom/gpi.c +0 -2
@@ -2289,8 +2289,6 @@ static const struct of_device_id gpi_of_match[] = {
 	{ .compatible = "qcom,sc7280-gpi-dma", .data = (void *)0x10000 },
 	{ .compatible = "qcom,sdm845-gpi-dma", .data = (void *)0x0 },
 	{ .compatible = "qcom,sm6350-gpi-dma", .data = (void *)0x10000 },
-	{ .compatible = "qcom,sm8150-gpi-dma", .data = (void *)0x0 },
-	{ .compatible = "qcom,sm8250-gpi-dma", .data = (void *)0x0 },

You cannot remove them that fast - it would be an ABI break. Just add a comment that these are deprecated and devices should match with a fallback compatible.

Best regards,
Krzysztof

maintainer
#9 lore raw

Re: [PATCH v3 4/4] dmaengine: qcom: gpi: drop redundant of_device_id entries

In reply to Richard Acayan
Quoted 14 lines · Richard Acayan

The drivers are transitioning from matching against lists of specific compatible strings to matching against smaller lists of more generic compatible strings. Continue the transition in the GPI DMA driver.

---
 drivers/dma/qcom/gpi.c | 2 --
 1 file changed, 2 deletions(-)
drivers/dma/qcom/gpi.c +0 -0
index 89839864b4ec..e5f37d61f30a 100644

drivers/dma/qcom/gpi.c static const struct of_device_id gpi_of_match[] = { · line 2293

Quoted 5 lines
drivers/dma/qcom/gpi.c +0 -2
@@ -2289,8 +2289,6 @@ static const struct of_device_id gpi_of_match[] = {
 	{ .compatible = "qcom,sc7280-gpi-dma", .data = (void *)0x10000 },
 	{ .compatible = "qcom,sdm845-gpi-dma", .data = (void *)0x0 },
 	{ .compatible = "qcom,sm6350-gpi-dma", .data = (void *)0x10000 },
-	{ .compatible = "qcom,sm8150-gpi-dma", .data = (void *)0x0 },
-	{ .compatible = "qcom,sm8250-gpi-dma", .data = (void *)0x0 },

We cant do this without breaking stuff...

There are DTs which have this id!

Quoted 5 lines
drivers/dma/qcom/gpi.c +0 -0
 	{ .compatible = "qcom,sm8350-gpi-dma", .data = (void *)0x10000 },
 	{ .compatible = "qcom,sm8450-gpi-dma", .data = (void *)0x10000 },
 	{ },
Signature · 1 line
2.37.3
Signature · 1 line
~Vinod