[PATCH 1/2] arm64: dts: ti: k3-j721s2-main: Add BCDMA instance for CSI2RX

Vaishnav Achath posted 2 patches 2 years, 2 months ago
There is a newer version of this series
[PATCH 1/2] arm64: dts: ti: k3-j721s2-main: Add BCDMA instance for CSI2RX
Posted by Vaishnav Achath 2 years, 2 months ago
J721S2 has a dedicated BCDMA controller for the Camera Serial Interface.
Events from the BCDMA controller instance are routed through the
main UDMA interrupt aggregator as unmapped events. Add the node for
the DMA controller and keep it disabled by default.

See J721S2 Technical Reference Manual (SPRUJ28)
for further details: http://www.ti.com/lit/pdf/spruj28

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
---
 arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
index 6d32544c8881..2a51a8d98c3c 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
@@ -807,6 +807,7 @@
 			ti,sci = <&sms>;
 			ti,sci-dev-id = <265>;
 			ti,interrupt-ranges = <0 0 256>;
+			ti,unmapped-event-sources = <&main_bcdma_csi>;
 		};
 
 		secure_proxy_main: mailbox@32c00000 {
@@ -1103,6 +1104,22 @@
 			ti,sci-rm-range-rflow = <0x00>; /* GP RFLOW */
 		};
 
+		main_bcdma_csi: dma-controller@311a0000 {
+			compatible = "ti,j721s2-dmss-bcdma-csi";
+			reg = <0x00 0x311a0000 0x00 0x100>,
+				<0x00 0x35d00000 0x00 0x20000>,
+				<0x00 0x35c00000 0x00 0x10000>,
+				<0x00 0x35e00000 0x00 0x80000>;
+			reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt";
+			msi-parent = <&main_udmass_inta>;
+			#dma-cells = <3>;
+			ti,sci = <&sms>;
+			ti,sci-dev-id = <225>;
+			ti,sci-rm-range-rchan = <0x21>;
+			ti,sci-rm-range-tchan = <0x22>;
+			status = "disabled";
+		};
+
 		cpts@310d0000 {
 			compatible = "ti,j721e-cpts";
 			reg = <0x0 0x310d0000 0x0 0x400>;
-- 
2.17.1
Re: [PATCH 1/2] arm64: dts: ti: k3-j721s2-main: Add BCDMA instance for CSI2RX
Posted by Jayesh Choudhary 2 years, 2 months ago
Hello Vaishnav,

On 10/10/23 14:56, Vaishnav Achath wrote:
> J721S2 has a dedicated BCDMA controller for the Camera Serial Interface.
> Events from the BCDMA controller instance are routed through the
> main UDMA interrupt aggregator as unmapped events. Add the node for
> the DMA controller and keep it disabled by default.
> 
> See J721S2 Technical Reference Manual (SPRUJ28)
> for further details: http://www.ti.com/lit/pdf/spruj28
> 
> Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
> ---
>   arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
> index 6d32544c8881..2a51a8d98c3c 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
> @@ -807,6 +807,7 @@
>   			ti,sci = <&sms>;
>   			ti,sci-dev-id = <265>;
>   			ti,interrupt-ranges = <0 0 256>;
> +			ti,unmapped-event-sources = <&main_bcdma_csi>;
>   		};
>   
>   		secure_proxy_main: mailbox@32c00000 {
> @@ -1103,6 +1104,22 @@
>   			ti,sci-rm-range-rflow = <0x00>; /* GP RFLOW */
>   		};
>   
> +		main_bcdma_csi: dma-controller@311a0000 {
> +			compatible = "ti,j721s2-dmss-bcdma-csi";
> +			reg = <0x00 0x311a0000 0x00 0x100>,
> +				<0x00 0x35d00000 0x00 0x20000>,
> +				<0x00 0x35c00000 0x00 0x10000>,
> +				<0x00 0x35e00000 0x00 0x80000>;

Indentation is off here...
Same in patch 2/2..


> +			reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt";
> +			msi-parent = <&main_udmass_inta>;
> +			#dma-cells = <3>;
> +			ti,sci = <&sms>;
> +			ti,sci-dev-id = <225>;
> +			ti,sci-rm-range-rchan = <0x21>;
> +			ti,sci-rm-range-tchan = <0x22>;
> +			status = "disabled";
> +		};
> +
>   		cpts@310d0000 {
>   			compatible = "ti,j721e-cpts";
>   			reg = <0x0 0x310d0000 0x0 0x400>;