dt-bindings: dma: ti: k3-bcdma: Add TX channel for AM62A CSIRX BCDMA
Subsystems (3)
PATCH 1/2 dt-bindings: dma: ti: k3-bcdma: Add TX channel for AM62A CSIRX BCDMA
J722S CSIRX BCDMA is based on AM62A BCDMA and supports CSI TX channels in addition to currently supported RX channels. Add TX channel properties as optional properties in the list so that the same compatible can be reused. K3 UDMA makes use of TCHAN_CNT capabilities register to identify whether platform supports TX channels.
--- 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
@@ -138,19 +138,22 @@ allOf: then: properties: ti,sci-rm-range-bchan: false - ti,sci-rm-range-tchan: false reg: + minItems: 3 items: - description: BCDMA Control /Status Registers region - description: RX Channel Realtime Registers region - description: Ring Realtime Registers region + - description: TX Channel Realtime Registers region reg-names: + minItems: 3 items: - const: gcfg - const: rchanrt - const: ringrt + - const: tchanrt required: - power-domains
Signature · 1 line
2.34.1
PATCH 2/2 dmaengine: ti: k3-udma: Add TX channel data in AM62A CSIRX DMSS
J722S/AM67 uses the same BCDMA CSIRX IP as AM62A, but it supports TX channels as well in addition to RX. Add the BCDMA TCHAN information in the am62a_dmss_csi_soc_data so as to support all the platforms in the family with same compatible. UDMA_CAP2_TCHAN_CNT indicates the presence of TX channels and it will be 0 for platforms without TX support.
---
CSI2RX capture test results on J722S EVM with IMX219:
https://gist.github.com/vaishnavachath/e2eaed62ee8f53428ee9b830aaa02cc3
drivers/dma/ti/k3-udma.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/dma/ti/k3-udma.c +2 -0
@@ -4340,6 +4340,8 @@ static struct udma_match_data j721e_mcu_data = {static struct udma_soc_data am62a_dmss_csi_soc_data = { .oes = { + .bcdma_tchan_data =0x800 , + .bcdma_tchan_ring =0xa00 , .bcdma_rchan_data =0xe00 , .bcdma_rchan_ring =0x1000 , },
Signature · 1 line
2.34.1
Re: [PATCH 2/2] dmaengine: ti: k3-udma: Add TX channel data in AM62A CSIRX DMSS
Quoted 2 lines · Vaishnav Achath
J722S/AM67 uses the same BCDMA CSIRX IP as AM62A, but it supports TX channels as well in addition to RX.
This doesn't make sense. You say that the am62a doesn't have a tx channel ("but it supports TX as well") but then modify the struct for the am62a to add a tx channel. Does that not break things on the am62a?
Quoted 30 lines
Add the BCDMA TCHAN information
in theam62a_dmss_csi_soc_dataso as to support all the platforms in the family with same compatible.UDMA_CAP2_TCHAN_CNTindicates the presence of TX channels and it will be 0 for platforms without TX support.Signed-off-by Vaishnav Achath <[email protected]>---
CSI2RX capture test results on J722S EVM with IMX219:
https://gist.github.com/vaishnavachath/e2eaed62ee8f53428ee9b830aaa02cc3drivers/dma/ti/k3-udma.c | 2 ++ 1 file changed, 2 insertions(+)drivers/dma/ti/k3-udma.c +2
-0@@ -4340,6 +4340,8 @@ static struct udma_match_data j721e_mcu_data = {static struct udma_soc_data am62a_dmss_csi_soc_data = { .oes = { + .bcdma_tchan_data =0x800 , + .bcdma_tchan_ring =0xa00 , .bcdma_rchan_data =0xe00 , .bcdma_rchan_ring =0x1000 , },Signature · 1 line
2.34.1
Re: [PATCH 2/2] dmaengine: ti: k3-udma: Add TX channel data in AM62A CSIRX DMSS
Hi Conor,
Quoted 8 lines · Conor Dooley
Quoted 2 lines · Vaishnav Achath
J722S/AM67 uses the same BCDMA CSIRX IP as AM62A, but it supports TX channels as well in addition to RX.
This doesn't make sense. You say that the am62a doesn't have a tx channel ("but it supports TX as well") but then modify the struct for the am62a to add a tx channel. Does that not break things on the am62a?
Thank you for the review, I have sent a v2 of this series adding new compatible as suggested, after looking at it again, the J722S BCDMA CSI is more similar to J721S2 in terms of having RX and TX support, so updated in that way.
The below changes did not really break AM62A since the driver checks hardware capability registers (TCHAN_CNT) to detect presence of TX channels and then only use the Output Event Steering(OES) data below.
V2:
https://lore.kernel.org/all/[email protected]/
Thanks and Regards,
Vaishnav
Quoted 31 lines
Quoted 31 lines
Add the BCDMA TCHAN information
in theam62a_dmss_csi_soc_dataso as to support all the platforms in the family with same compatible.UDMA_CAP2_TCHAN_CNTindicates the presence of TX channels and it will be 0 for platforms without TX support.Signed-off-by Vaishnav Achath <[email protected]>---
CSI2RX capture test results on J722S EVM with IMX219:
https://gist.github.com/vaishnavachath/e2eaed62ee8f53428ee9b830aaa02cc3drivers/dma/ti/k3-udma.c | 2 ++ 1 file changed, 2 insertions(+)drivers/dma/ti/k3-udma.c +2
-0@@ -4340,6 +4340,8 @@ static struct udma_match_data j721e_mcu_data = {static struct udma_soc_data am62a_dmss_csi_soc_data = { .oes = { + .bcdma_tchan_data =0x800 , + .bcdma_tchan_ring =0xa00 , .bcdma_rchan_data =0xe00 , .bcdma_rchan_ring =0x1000 , },Signature · 1 line
2.34.1
Quoted 1 line · Vaishnav Achath
J722S CSIRX BCDMA is based on AM62A BCDMA and supports CSI TX channels
There's no specific compatible in this file for a j722s, you should add one.
Quoted 16 lines
in addition to currently supported RX channels. Add TX channel properties as optional properties in the list so that the same compatible can be reused. K3 UDMA makes use of
TCHAN_CNTcapabilities register to identify whether platform supports TX channels.Signed-off-by Vaishnav Achath <[email protected]>--- Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml +0
-0
Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml allOf: · line 143
Quoted 7 lines
Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml +1
-1@@ -138,19 +138,22 @@ allOf: then: properties: ti,sci-rm-range-bchan: false - ti,sci-rm-range-tchan: false reg: + minItems: 3
You need to then constrain maxItems to 3 for all !j722s devices in an if/then/else to avoid allowing 4 reg entries where it is not valid.
Thanks,
Conor.
Quoted 19 lines
Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml +3
-0items: - description: BCDMA Control /Status Registers region - description: RX Channel Realtime Registers region - description: Ring Realtime Registers region + - description: TX Channel Realtime Registers region reg-names: + minItems: 3 items: - const: gcfg - const: rchanrt - const: ringrt + - const: tchanrt required: - power-domainsSignature · 1 line
2.34.1