Skip to contentSkip to conversation

Add support for J722S CSI BCDMA

PATCH Applied Vaishnav Achath 4 participants 8 messages Nov 27, 2024 – Dec 24, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v3 cover Add support for J722S CSI BCDMA

This series adds support for CSI Block Copy DMA (BCDMA) instance on J722S, the BCDMA instance is similar to other CSI BCDMA found in rest of TI devices like J721S2, AM62A. It supports both RX (CSI2RX) and TX (CSITX) channels and is identical to J721S2 CSIRX BCDMA but has slight integration difference in the PSIL base thread ID which is currently handled in the k3-udma driver from the match_data, introduce a new compatible to support J722S BCDMA.

Changelog:
V2->V3:
* Added missing compatible entry missed in v2.
* Address Krzysztof's review comments to not wrap commit message too early.

V1->V2:
* Address review from Conor to add new J722S compatible
* J722S BCDMA is more similar to J721S2 in terms of RX/TX support, add an entry alongside J721S2 instead of modifying AM62A.

V1: https://lore.kernel.org/all/[email protected]/
V2: https://lore.kernel.org/all/[email protected]/

CSI2RX capture test results on J722S EVM with 4 x IMX219:
https://gist.github.com/vaishnavachath/e2eaed62ee8f53428ee9b830aaa02cc3

Branch with all the DT changes on top of this integrated:
https://github.com/vaishnavachath/linux/tree/j722scsi

Vaishnav Achath (2):
dt-bindings: dma: ti: k3-bcdma: Add J722S CSI BCDMA
dmaengine: ti: k3-udma: Add support for J722S CSI BCDMA

 .../devicetree/bindings/dma/ti/k3-bcdma.yaml     |  5 ++++-
 drivers/dma/ti/k3-udma.c                         | 16 ++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/2 dt-bindings: dma: ti: k3-bcdma: Add J722S CSI BCDMA

J722S CSI BCDMA is similar to J721S2 CSI BCDMA and supports both RX and TX channels but has a different PSIL thread base ID which is currently handled in k3-udma driver. Add an entry for J722S CSIRX BCDMA.

---

V2->V3:
* Added missing compatible entry missed in v2.
* Address Krzysztof's review comments to not wrap commit message too early.

V1->V2:
* Address review from Conor to add new J722S compatible
* J722S BCDMA is more similar to J721S2 in terms of RX/TX support, add an entry alongside J721S2 instead of modifying AM62A.

 Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml +4 -1
index 27b8e1636560..b5bc842c5a0e 100644
@@ -34,6 +34,7 @@ properties:
       - ti,am62a-dmss-bcdma-csirx
       - ti,am64-dmss-bcdma
       - ti,j721s2-dmss-bcdma-csi
+      - ti,j722s-dmss-bcdma-csi
 
   reg:
     minItems: 3
@@ -196,7 +197,9 @@ allOf:
       properties:
         compatible:
           contains:
-            const: ti,j721s2-dmss-bcdma-csi
+            enum:
+              - ti,j721s2-dmss-bcdma-csi
+              - ti,j722s-dmss-bcdma-csi
     then:
       properties:
         ti,sci-rm-range-bchan: false
Signature · 1 line
2.34.1
maintainer Reviewed-by on v3 1/2
#2 lore raw

Re: [PATCH v3 1/2] dt-bindings: dma: ti: k3-bcdma: Add J722S CSI BCDMA

Quoted 12 lines · Vaishnav Achath

J722S CSI BCDMA is similar to J721S2 CSI BCDMA and supports both RX and TX channels but has a different PSIL thread base ID which is currently handled in k3-udma driver. Add an entry for J722S CSIRX BCDMA.

---

V2->V3:
* Added missing compatible entry missed in v2.
* Address Krzysztof's review comments to not wrap commit message too early.

Quoted 8 lines

V1->V2:
* Address review from Conor to add new J722S compatible
* J722S BCDMA is more similar to J721S2 in terms of RX/TX support, add an entry alongside J721S2 instead of modifying AM62A.

 Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
#3 lore raw

PATCH v3 2/2 dmaengine: ti: k3-udma: Add support for J722S CSI BCDMA

In reply to Vaishnav Achath

J722S CSI BCDMA is similar to J721S2 CSI BCDMA but there are slight integration differences like different PSIL thread base ID which is currently handled in the driver based on udma_of_match data. Add an entry to support J722S CSIRX.

---

V2->V3 : Minor edit in commit message.

V1->V2:
* Add new compatible for J722S instead of modifying AM62A

 drivers/dma/ti/k3-udma.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/dma/ti/k3-udma.c +16 -0
index b3f27b3f9209..7ed1956b4642 100644
@@ -4404,6 +4404,18 @@ static struct udma_match_data j721s2_bcdma_csi_data = {
 	.soc_data = &j721s2_bcdma_csi_soc_data,
 };
 
+static struct udma_match_data j722s_bcdma_csi_data = {
+	.type = DMA_TYPE_BCDMA,
+	.psil_base = 0x3100,
+	.enable_memcpy_support = false,
+	.burst_size = {
+		TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_64_BYTES, /* Normal Channels */
+		0, /* No H Channels */
+		0, /* No UH Channels */
+	},
+	.soc_data = &j721s2_bcdma_csi_soc_data,
+};
+
 static const struct of_device_id udma_of_match[] = {
 	{
 		.compatible = "ti,am654-navss-main-udmap",
@@ -4435,6 +4447,10 @@ static const struct of_device_id udma_of_match[] = {
 		.compatible = "ti,j721s2-dmss-bcdma-csi",
 		.data = &j721s2_bcdma_csi_data,
 	},
+	{
+		.compatible = "ti,j722s-dmss-bcdma-csi",
+		.data = &j722s_bcdma_csi_data,
+	},
 	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, udma_of_match);
Signature · 1 line
2.34.1
maintainer
#4 lore raw

Re: [PATCH v3 2/2] dmaengine: ti: k3-udma: Add support for J722S CSI BCDMA

Quoted 22 lines · Vaishnav Achath

J722S CSI BCDMA is similar to J721S2 CSI BCDMA but there are slight integration differences like different PSIL thread base ID which is currently handled in the driver based on udma_of_match data. Add an entry to support J722S CSIRX.

---

V2->V3 : Minor edit in commit message.

V1->V2:
* Add new compatible for J722S instead of modifying AM62A

 drivers/dma/ti/k3-udma.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/dma/ti/k3-udma.c +0 -0
index b3f27b3f9209..7ed1956b4642 100644
@@ -4404,6 +4404,18 @@ static struct udma_match_data j721s2_bcdma_csi_data = {
 	.soc_data = &j721s2_bcdma_csi_soc_data,

drivers/dma/ti/k3-udma.c static struct udma_match_data j721s2_bcdma_csi_data = { · line 4414

Quoted 10 lines
drivers/dma/ti/k3-udma.c +8 -0
 };
 
+static struct udma_match_data j722s_bcdma_csi_data = {
+	.type = DMA_TYPE_BCDMA,
+	.psil_base = 0x3100,
+	.enable_memcpy_support = false,
+	.burst_size = {
+		TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_64_BYTES, /* Normal Channels */
+		0, /* No H Channels */
+		0, /* No UH Channels */

Why are these zeros? we expect valid size...

Quoted 20 lines
drivers/dma/ti/k3-udma.c +8 -0
+	},
+	.soc_data = &j721s2_bcdma_csi_soc_data,
+};
+
 static const struct of_device_id udma_of_match[] = {
 	{
 		.compatible = "ti,am654-navss-main-udmap",
@@ -4435,6 +4447,10 @@ static const struct of_device_id udma_of_match[] = {
 		.compatible = "ti,j721s2-dmss-bcdma-csi",
 		.data = &j721s2_bcdma_csi_data,
 	},
+	{
+		.compatible = "ti,j722s-dmss-bcdma-csi",
+		.data = &j722s_bcdma_csi_data,
+	},
 	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, udma_of_match);
Signature · 1 line
2.34.1
Signature · 1 line
~Vinod
#5 lore raw

Re: [PATCH v3 2/2] dmaengine: ti: k3-udma: Add support for J722S CSI BCDMA

Hi Vinod,

Quoted 25 lines · Vinod Koul
Quoted 24 lines · Vaishnav Achath

J722S CSI BCDMA is similar to J721S2 CSI BCDMA but there are slight integration differences like different PSIL thread base ID which is currently handled in the driver based on udma_of_match data. Add an entry to support J722S CSIRX.

---

V2->V3 : Minor edit in commit message.

V1->V2:
* Add new compatible for J722S instead of modifying AM62A

  drivers/dma/ti/k3-udma.c | 16 ++++++++++++++++
  1 file changed, 16 insertions(+)
drivers/dma/ti/k3-udma.c +0 -0
index b3f27b3f9209..7ed1956b4642 100644
@@ -4404,6 +4404,18 @@ static struct udma_match_data j721s2_bcdma_csi_data = {
  	.soc_data = &j721s2_bcdma_csi_soc_data,
  };
 
Quoted 11 lines

drivers/dma/ti/k3-udma.c static struct udma_match_data j721s2_bcdma_csi_data = { · line 4414

Quoted 8 lines
drivers/dma/ti/k3-udma.c +8 -0
+static struct udma_match_data j722s_bcdma_csi_data = {
+	.type = DMA_TYPE_BCDMA,
+	.psil_base = 0x3100,
+	.enable_memcpy_support = false,
+	.burst_size = {
+		TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_64_BYTES, /* Normal Channels */
+		0, /* No H Channels */
+		0, /* No UH Channels */

Why are these zeros? we expect valid size...

Sorry for the delay in response, this instance does not have High capacity/Ultra high capacity channels, the burst_size for normal channels is non-zero in the above, this is done similar to other instances supported in the driver:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/ti/k3-udma.c#n4363

Please let me know if something need to be fixed.

Thanks and Regards,
Vaishnav

Quoted 21 lines
Quoted 20 lines
drivers/dma/ti/k3-udma.c +8 -0
+	},
+	.soc_data = &j721s2_bcdma_csi_soc_data,
+};
+
  static const struct of_device_id udma_of_match[] = {
  	{
  		.compatible = "ti,am654-navss-main-udmap",
@@ -4435,6 +4447,10 @@ static const struct of_device_id udma_of_match[] = {
  		.compatible = "ti,j721s2-dmss-bcdma-csi",
  		.data = &j721s2_bcdma_csi_data,
  	},
+	{
+		.compatible = "ti,j722s-dmss-bcdma-csi",
+		.data = &j722s_bcdma_csi_data,
+	},
  	{ /* Sentinel */ },
  };
  MODULE_DEVICE_TABLE(of, udma_of_match);
Signature · 1 line
2.34.1
Acked-by on v3 2/2
#6 lore raw

Re: [PATCH v3 2/2] dmaengine: ti: k3-udma: Add support for J722S CSI BCDMA

In reply to Vaishnav Achath
Quoted 4 lines · Vaishnav Achath

J722S CSI BCDMA is similar to J721S2 CSI BCDMA but there are slight integration differences like different PSIL thread base ID which is currently handled in the driver based on udma_of_match data. Add an entry to support J722S CSIRX.

Quoted 46 lines

---

V2->V3 : Minor edit in commit message.

V1->V2:
* Add new compatible for J722S instead of modifying AM62A

 drivers/dma/ti/k3-udma.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/dma/ti/k3-udma.c +16 -0
index b3f27b3f9209..7ed1956b4642 100644
@@ -4404,6 +4404,18 @@ static struct udma_match_data j721s2_bcdma_csi_data = {
 	.soc_data = &j721s2_bcdma_csi_soc_data,
 };
 
+static struct udma_match_data j722s_bcdma_csi_data = {
+	.type = DMA_TYPE_BCDMA,
+	.psil_base = 0x3100,
+	.enable_memcpy_support = false,
+	.burst_size = {
+		TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_64_BYTES, /* Normal Channels */
+		0, /* No H Channels */
+		0, /* No UH Channels */
+	},
+	.soc_data = &j721s2_bcdma_csi_soc_data,
+};
+
 static const struct of_device_id udma_of_match[] = {
 	{
 		.compatible = "ti,am654-navss-main-udmap",
@@ -4435,6 +4447,10 @@ static const struct of_device_id udma_of_match[] = {
 		.compatible = "ti,j721s2-dmss-bcdma-csi",
 		.data = &j721s2_bcdma_csi_data,
 	},
+	{
+		.compatible = "ti,j722s-dmss-bcdma-csi",
+		.data = &j722s_bcdma_csi_data,
+	},
 	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, udma_of_match);
Signature · 1 line
Péter
maintainer Applied
#7 lore raw
In reply to Vaishnav Achath
Quoted 9 lines · Vaishnav Achath

This series adds support for CSI Block Copy DMA (BCDMA) instance on J722S, the BCDMA instance is similar to other CSI BCDMA found in rest of TI devices like J721S2, AM62A. It supports both RX (CSI2RX) and TX (CSITX) channels and is identical to J721S2 CSIRX BCDMA but has slight integration difference in the PSIL base thread ID which is currently handled in the k3-udma driver from the match_data, introduce a new compatible to support J722S BCDMA.

[...]

Applied, thanks!

[1/2] dt-bindings: dma: ti: k3-bcdma: Add J722S CSI BCDMA

      commit: 775363772f5e72b984a883e22d510fec5357477a
[2/2] dmaengine: ti: k3-udma: Add support for J722S CSI BCDMA
      commit: d0301fdbb50dfc99215b0f999d4ff7ab0a7675d9

Best regards,

Signature · 1 line
~Vinod