2023-05-05 08:47:47

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH v2 0/2] Add support for J721S2 CSI BCDMA

This series adds support for J721S2 BCDMA instance for Camera Serial
Interface (CSI).

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

V1->V2:
Address Krzysztof's feedback:
* Move J721S2 BCDMA entry to else condition to avoid failure
with AM62A BCDMA in binding.
dtbs_check :
https://gist.github.com/vaishnavachath/221155d02575e0c5803a62f2ee22e70e

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

.../devicetree/bindings/dma/ti/k3-bcdma.yaml | 54 +++++++++++++------
drivers/dma/ti/k3-udma.c | 25 +++++++++
2 files changed, 64 insertions(+), 15 deletions(-)

--
2.17.1


2023-05-05 10:23:49

by Vaishnav Achath

[permalink] [raw]
Subject: [PATCH v2 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]>
---

V1->V2:
* Move J721S2 BCDMA entry to else condition to avoid failure
with AM62A BCDMA.

.../devicetree/bindings/dma/ti/k3-bcdma.yaml | 54 +++++++++++++------
1 file changed, 39 insertions(+), 15 deletions(-)

diff --git a/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml b/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
index beecfe7a1732..54d4b8e0c8ce 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
@@ -152,21 +153,44 @@ allOf:
- power-domains

else:
- properties:
- reg:
- minItems: 5
-
- reg-names:
- items:
- - const: gcfg
- - const: bchanrt
- - const: rchanrt
- - const: tchanrt
- - const: ringrt
-
- required:
- - ti,sci-rm-range-bchan
- - ti,sci-rm-range-tchan
+ 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:
+ minItems: 5
+
+ reg-names:
+ items:
+ - const: gcfg
+ - const: bchanrt
+ - const: rchanrt
+ - const: tchanrt
+ - const: ringrt
+
+ required:
+ - ti,sci-rm-range-bchan
+ - ti,sci-rm-range-tchan

unevaluatedProperties: false

--
2.17.1

2023-05-05 12:41:16

by Krzysztof Kozlowski

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

On 05/05/2023 10:26, 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]>
> ---
>
> V1->V2:
> * Move J721S2 BCDMA entry to else condition to avoid failure
> with AM62A BCDMA.
>
> .../devicetree/bindings/dma/ti/k3-bcdma.yaml | 54 +++++++++++++------
> 1 file changed, 39 insertions(+), 15 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml b/Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml
> index beecfe7a1732..54d4b8e0c8ce 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
> @@ -152,21 +153,44 @@ allOf:
> - power-domains
>
> else:
> - properties:
> - reg:
> - minItems: 5
> -
> - reg-names:
> - items:
> - - const: gcfg
> - - const: bchanrt
> - - const: rchanrt
> - - const: tchanrt
> - - const: ringrt
> -
> - required:
> - - ti,sci-rm-range-bchan
> - - ti,sci-rm-range-tchan
> + 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:

Avoid if:else:if:else and alike. I asked to add one more if covering
this case.

Best regards,
Krzysztof