2023-05-03 07:00:28

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: dma: ti: Add J721S2 BCDMA

Add bindings for J721S2 BCDMA instance dedicated for Camera
Serial Interface. Unlike AM62A CSI BCDMA, this instance has RX
and TX channels but lacks block copy channels.

Signed-off-by: Vaishnav Achath <[email protected]>
---
.../devicetree/bindings/dma/ti/k3-bcdma.yaml | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)

diff --git a/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml b/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
index beecfe7a1732..5ca9581a66f4 100644
--- a/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
+++ b/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
@@ -33,6 +33,7 @@ properties:
enum:
- ti,am62a-dmss-bcdma-csirx
- ti,am64-dmss-bcdma
+ - ti,j721s2-dmss-bcdma-csi

reg:
minItems: 3
@@ -150,7 +151,27 @@ allOf:

required:
- power-domains
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: ti,j721s2-dmss-bcdma-csi
+ then:
+ properties:
+ ti,sci-rm-range-bchan: false
+
+ reg:
+ maxItems: 4

+ reg-names:
+ items:
+ - const: gcfg
+ - const: rchanrt
+ - const: tchanrt
+ - const: ringrt
+
+ required:
+ - ti,sci-rm-range-tchan
else:
properties:
reg:
--
2.17.1


2023-05-03 07:00:59

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH 2/2] dmaengine: ti: k3-udma: Add support for J721S2 CSI BCDMA instance

J721S2 has dedicated BCDMA instance for Camera Serial Interface RX
and TX. The BCDMA instance supports RX and TX channels but block copy
channels are not present, add support for the same.

Signed-off-by: Vaishnav Achath <[email protected]>
---
drivers/dma/ti/k3-udma.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index fc3a2a05ab7b..16c5c333808b 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -4308,6 +4308,15 @@ static struct udma_soc_data am62a_dmss_csi_soc_data = {
},
};

+static struct udma_soc_data j721s2_bcdma_csi_soc_data = {
+ .oes = {
+ .bcdma_tchan_data = 0x800,
+ .bcdma_tchan_ring = 0xa00,
+ .bcdma_rchan_data = 0xe00,
+ .bcdma_rchan_ring = 0x1000,
+ },
+};
+
static struct udma_match_data am62a_bcdma_csirx_data = {
.type = DMA_TYPE_BCDMA,
.psil_base = 0x3100,
@@ -4346,6 +4355,18 @@ static struct udma_match_data am64_pktdma_data = {
},
};

+static struct udma_match_data j721s2_bcdma_csi_data = {
+ .type = DMA_TYPE_BCDMA,
+ .psil_base = 0x2000,
+ .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",
@@ -4373,6 +4394,10 @@ static const struct of_device_id udma_of_match[] = {
.compatible = "ti,am62a-dmss-bcdma-csirx",
.data = &am62a_bcdma_csirx_data,
},
+ {
+ .compatible = "ti,j721s2-dmss-bcdma-csi",
+ .data = &j721s2_bcdma_csi_data,
+ },
{ /* Sentinel */ },
};

--
2.17.1

2023-05-04 17:07:43

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: dma: ti: Add J721S2 BCDMA

On 03/05/2023 08:53, Vaishnav Achath wrote:
> Add bindings for J721S2 BCDMA instance dedicated for Camera
> Serial Interface. Unlike AM62A CSI BCDMA, this instance has RX
> and TX channels but lacks block copy channels.
>
> Signed-off-by: Vaishnav Achath <[email protected]>
> ---
> .../devicetree/bindings/dma/ti/k3-bcdma.yaml | 21 +++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml b/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
> index beecfe7a1732..5ca9581a66f4 100644
> --- a/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
> +++ b/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
> @@ -33,6 +33,7 @@ properties:
> enum:
> - ti,am62a-dmss-bcdma-csirx
> - ti,am64-dmss-bcdma
> + - ti,j721s2-dmss-bcdma-csi
>
> reg:
> minItems: 3
> @@ -150,7 +151,27 @@ allOf:
>
> required:
> - power-domains
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: ti,j721s2-dmss-bcdma-csi
> + then:
> + properties:
> + ti,sci-rm-range-bchan: false
> +
> + reg:
> + maxItems: 4
>
> + reg-names:
> + items:
> + - const: gcfg
> + - const: rchanrt
> + - const: tchanrt
> + - const: ringrt
> +
> + required:
> + - ti,sci-rm-range-tchan
> else:
> properties:


You now require 5 reg items on ti,am62a-dmss-bcdma-csirx. I don't think
you tested your DTS against this change. Rework the else: so it will
match specific variant (if:).

Best regards,
Krzysztof

2023-05-05 09:17:33

by Vaishnav Achath

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: dma: ti: Add J721S2 BCDMA

Hi Krzysztof,

On 04/05/23 22:34, Krzysztof Kozlowski wrote:
> On 03/05/2023 08:53, Vaishnav Achath wrote:
>> Add bindings for J721S2 BCDMA instance dedicated for Camera
>> Serial Interface. Unlike AM62A CSI BCDMA, this instance has RX
>> and TX channels but lacks block copy channels.
>>
>> Signed-off-by: Vaishnav Achath <[email protected]>
>> ---
>> .../devicetree/bindings/dma/ti/k3-bcdma.yaml | 21 +++++++++++++++++++
>> 1 file changed, 21 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml b/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
>> index beecfe7a1732..5ca9581a66f4 100644
>> --- a/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
>> +++ b/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
>> @@ -33,6 +33,7 @@ properties:
>> enum:
>> - ti,am62a-dmss-bcdma-csirx
>> - ti,am64-dmss-bcdma
>> + - ti,j721s2-dmss-bcdma-csi
>>
>> reg:
>> minItems: 3
>> @@ -150,7 +151,27 @@ allOf:
>>
>> required:
>> - power-domains
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: ti,j721s2-dmss-bcdma-csi
>> + then:
>> + properties:
>> + ti,sci-rm-range-bchan: false
>> +
>> + reg:
>> + maxItems: 4
>>
>> + reg-names:
>> + items:
>> + - const: gcfg
>> + - const: rchanrt
>> + - const: tchanrt
>> + - const: ringrt
>> +
>> + required:
>> + - ti,sci-rm-range-tchan
>> else:
>> properties:
>
>
> You now require 5 reg items on ti,am62a-dmss-bcdma-csirx. I don't think
> you tested your DTS against this change. Rework the else: so it will
> match specific variant (if:).

Thank you for the review, Sorry, I did not have the ti,am62a-dmss-bcdma-csirx
instance added while I tested this change, I have made the update you suggested,
checked DTS with the nodes added and sent a v2 now.

Thanks and Regards,
Vaishnav

>
> Best regards,
> Krzysztof
>

--
Regards,
Vaishnav