LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/2] J721S2: Add initial support
@ 2021-11-19 13:23 Aswath Govindraju
  2021-11-19 13:23 ` [PATCH 1/2] dmaengine: ti: k3-udma: Add SoC dependent data for J721S2 SoC Aswath Govindraju
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Aswath Govindraju @ 2021-11-19 13:23 UTC (permalink / raw)
  Cc: Nishanth Menon, Vignesh Raghavendra, Kishon Vijay Abraham I,
	Aswath Govindraju, Peter Ujfalusi, Vinod Koul, linux-kernel,
	dmaengine

The following series of patches add support for J721S2 SoC.

Currently, the PSIL source and destination thread IDs for only a few of the
IPs have been added. The remaning ones will be added as and when they are
tested.

The following series of patches are dependent on,
- http://lists.infradead.org/pipermail/linux-arm-kernel/2021-November/697574.html

Aswath Govindraju (2):
  dmaengine: ti: k3-udma: Add SoC dependent data for J721S2 SoC
  drivers: dma: ti: k3-psil: Add support for J721S2

 drivers/dma/ti/Makefile         |   3 +-
 drivers/dma/ti/k3-psil-j721s2.c | 167 ++++++++++++++++++++++++++++++++
 drivers/dma/ti/k3-psil-priv.h   |   1 +
 drivers/dma/ti/k3-psil.c        |   1 +
 drivers/dma/ti/k3-udma.c        |   1 +
 5 files changed, 172 insertions(+), 1 deletion(-)
 create mode 100644 drivers/dma/ti/k3-psil-j721s2.c

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] dmaengine: ti: k3-udma: Add SoC dependent data for J721S2 SoC
  2021-11-19 13:23 [PATCH 0/2] J721S2: Add initial support Aswath Govindraju
@ 2021-11-19 13:23 ` Aswath Govindraju
  2021-11-19 13:23 ` [PATCH 2/2] drivers: dma: ti: k3-psil: Add support for J721S2 Aswath Govindraju
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Aswath Govindraju @ 2021-11-19 13:23 UTC (permalink / raw)
  Cc: Nishanth Menon, Vignesh Raghavendra, Kishon Vijay Abraham I,
	Aswath Govindraju, Peter Ujfalusi, Vinod Koul, linux-kernel,
	dmaengine

Add SYSFW defined rchan_oes_offset number for J721S2 SoC in soc data.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
 drivers/dma/ti/k3-udma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 041d8e32d630..895dcd0e8b60 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -4376,6 +4376,7 @@ static const struct soc_device_attribute k3_soc_devices[] = {
 	{ .family = "J721E", .data = &j721e_soc_data },
 	{ .family = "J7200", .data = &j7200_soc_data },
 	{ .family = "AM64X", .data = &am64_soc_data },
+	{ .family = "J721S2", .data = &j721e_soc_data},
 	{ /* sentinel */ }
 };
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] drivers: dma: ti: k3-psil: Add support for J721S2
  2021-11-19 13:23 [PATCH 0/2] J721S2: Add initial support Aswath Govindraju
  2021-11-19 13:23 ` [PATCH 1/2] dmaengine: ti: k3-udma: Add SoC dependent data for J721S2 SoC Aswath Govindraju
@ 2021-11-19 13:23 ` Aswath Govindraju
  2021-11-22 18:08 ` [PATCH 0/2] J721S2: Add initial support Péter Ujfalusi
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Aswath Govindraju @ 2021-11-19 13:23 UTC (permalink / raw)
  Cc: Nishanth Menon, Vignesh Raghavendra, Kishon Vijay Abraham I,
	Aswath Govindraju, Peter Ujfalusi, Vinod Koul, linux-kernel,
	dmaengine

Add support for J721S2 SOC.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
 drivers/dma/ti/Makefile         |   3 +-
 drivers/dma/ti/k3-psil-j721s2.c | 167 ++++++++++++++++++++++++++++++++
 drivers/dma/ti/k3-psil-priv.h   |   1 +
 drivers/dma/ti/k3-psil.c        |   1 +
 4 files changed, 171 insertions(+), 1 deletion(-)
 create mode 100644 drivers/dma/ti/k3-psil-j721s2.c

diff --git a/drivers/dma/ti/Makefile b/drivers/dma/ti/Makefile
index bd496efadff7..1d4081a049b7 100644
--- a/drivers/dma/ti/Makefile
+++ b/drivers/dma/ti/Makefile
@@ -8,5 +8,6 @@ obj-$(CONFIG_TI_K3_PSIL) += k3-psil.o \
 			    k3-psil-am654.o \
 			    k3-psil-j721e.o \
 			    k3-psil-j7200.o \
-			    k3-psil-am64.o
+			    k3-psil-am64.o \
+			    k3-psil-j721s2.o
 obj-$(CONFIG_TI_DMA_CROSSBAR) += dma-crossbar.o
diff --git a/drivers/dma/ti/k3-psil-j721s2.c b/drivers/dma/ti/k3-psil-j721s2.c
new file mode 100644
index 000000000000..4c4172a4d271
--- /dev/null
+++ b/drivers/dma/ti/k3-psil-j721s2.c
@@ -0,0 +1,167 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ *  Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com
+ */
+
+#include <linux/kernel.h>
+
+#include "k3-psil-priv.h"
+
+#define PSIL_PDMA_XY_TR(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_PDMA_XY,	\
+		},					\
+	}
+
+#define PSIL_PDMA_XY_PKT(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_PDMA_XY,	\
+			.pkt_mode = 1,			\
+		},					\
+	}
+
+#define PSIL_PDMA_MCASP(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_PDMA_XY,	\
+			.pdma_acc32 = 1,		\
+			.pdma_burst = 1,		\
+		},					\
+	}
+
+#define PSIL_ETHERNET(x)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_NATIVE,	\
+			.pkt_mode = 1,			\
+			.needs_epib = 1,		\
+			.psd_size = 16,			\
+		},					\
+	}
+
+#define PSIL_SA2UL(x, tx)				\
+	{						\
+		.thread_id = x,				\
+		.ep_config = {				\
+			.ep_type = PSIL_EP_NATIVE,	\
+			.pkt_mode = 1,			\
+			.needs_epib = 1,		\
+			.psd_size = 64,			\
+			.notdpkt = tx,			\
+		},					\
+	}
+
+/* PSI-L source thread IDs, used for RX (DMA_DEV_TO_MEM) */
+static struct psil_ep j721s2_src_ep_map[] = {
+	/* PDMA_MCASP - McASP0-4 */
+	PSIL_PDMA_MCASP(0x4400),
+	PSIL_PDMA_MCASP(0x4401),
+	PSIL_PDMA_MCASP(0x4402),
+	PSIL_PDMA_MCASP(0x4403),
+	PSIL_PDMA_MCASP(0x4404),
+	/* PDMA_SPI_G0 - SPI0-3 */
+	PSIL_PDMA_XY_PKT(0x4600),
+	PSIL_PDMA_XY_PKT(0x4601),
+	PSIL_PDMA_XY_PKT(0x4602),
+	PSIL_PDMA_XY_PKT(0x4603),
+	PSIL_PDMA_XY_PKT(0x4604),
+	PSIL_PDMA_XY_PKT(0x4605),
+	PSIL_PDMA_XY_PKT(0x4606),
+	PSIL_PDMA_XY_PKT(0x4607),
+	PSIL_PDMA_XY_PKT(0x4608),
+	PSIL_PDMA_XY_PKT(0x4609),
+	PSIL_PDMA_XY_PKT(0x460a),
+	PSIL_PDMA_XY_PKT(0x460b),
+	PSIL_PDMA_XY_PKT(0x460c),
+	PSIL_PDMA_XY_PKT(0x460d),
+	PSIL_PDMA_XY_PKT(0x460e),
+	PSIL_PDMA_XY_PKT(0x460f),
+	/* PDMA_SPI_G1 - SPI4-7 */
+	PSIL_PDMA_XY_PKT(0x4610),
+	PSIL_PDMA_XY_PKT(0x4611),
+	PSIL_PDMA_XY_PKT(0x4612),
+	PSIL_PDMA_XY_PKT(0x4613),
+	PSIL_PDMA_XY_PKT(0x4614),
+	PSIL_PDMA_XY_PKT(0x4615),
+	PSIL_PDMA_XY_PKT(0x4616),
+	PSIL_PDMA_XY_PKT(0x4617),
+	PSIL_PDMA_XY_PKT(0x4618),
+	PSIL_PDMA_XY_PKT(0x4619),
+	PSIL_PDMA_XY_PKT(0x461a),
+	PSIL_PDMA_XY_PKT(0x461b),
+	PSIL_PDMA_XY_PKT(0x461c),
+	PSIL_PDMA_XY_PKT(0x461d),
+	PSIL_PDMA_XY_PKT(0x461e),
+	PSIL_PDMA_XY_PKT(0x461f),
+	/* PDMA_USART_G0 - UART0-1 */
+	PSIL_PDMA_XY_PKT(0x4700),
+	PSIL_PDMA_XY_PKT(0x4701),
+	/* PDMA_USART_G1 - UART2-3 */
+	PSIL_PDMA_XY_PKT(0x4702),
+	PSIL_PDMA_XY_PKT(0x4703),
+	/* PDMA_USART_G2 - UART4-9 */
+	PSIL_PDMA_XY_PKT(0x4704),
+	PSIL_PDMA_XY_PKT(0x4705),
+	PSIL_PDMA_XY_PKT(0x4706),
+	PSIL_PDMA_XY_PKT(0x4707),
+	PSIL_PDMA_XY_PKT(0x4708),
+	PSIL_PDMA_XY_PKT(0x4709),
+	/* CPSW0 */
+	PSIL_ETHERNET(0x7000),
+	/* MCU_PDMA0 (MCU_PDMA_MISC_G0) - SPI0 */
+	PSIL_PDMA_XY_PKT(0x7100),
+	PSIL_PDMA_XY_PKT(0x7101),
+	PSIL_PDMA_XY_PKT(0x7102),
+	PSIL_PDMA_XY_PKT(0x7103),
+	/* MCU_PDMA1 (MCU_PDMA_MISC_G1) - SPI1-2 */
+	PSIL_PDMA_XY_PKT(0x7200),
+	PSIL_PDMA_XY_PKT(0x7201),
+	PSIL_PDMA_XY_PKT(0x7202),
+	PSIL_PDMA_XY_PKT(0x7203),
+	PSIL_PDMA_XY_PKT(0x7204),
+	PSIL_PDMA_XY_PKT(0x7205),
+	PSIL_PDMA_XY_PKT(0x7206),
+	PSIL_PDMA_XY_PKT(0x7207),
+	/* MCU_PDMA2 (MCU_PDMA_MISC_G2) - UART0 */
+	PSIL_PDMA_XY_PKT(0x7300),
+	/* MCU_PDMA_ADC - ADC0-1 */
+	PSIL_PDMA_XY_TR(0x7400),
+	PSIL_PDMA_XY_TR(0x7401),
+	PSIL_PDMA_XY_TR(0x7402),
+	PSIL_PDMA_XY_TR(0x7403),
+	/* SA2UL */
+	PSIL_SA2UL(0x7500, 0),
+	PSIL_SA2UL(0x7501, 0),
+	PSIL_SA2UL(0x7502, 0),
+	PSIL_SA2UL(0x7503, 0),
+};
+
+/* PSI-L destination thread IDs, used for TX (DMA_MEM_TO_DEV) */
+static struct psil_ep j721s2_dst_ep_map[] = {
+	/* CPSW0 */
+	PSIL_ETHERNET(0xf000),
+	PSIL_ETHERNET(0xf001),
+	PSIL_ETHERNET(0xf002),
+	PSIL_ETHERNET(0xf003),
+	PSIL_ETHERNET(0xf004),
+	PSIL_ETHERNET(0xf005),
+	PSIL_ETHERNET(0xf006),
+	PSIL_ETHERNET(0xf007),
+	/* SA2UL */
+	PSIL_SA2UL(0xf500, 1),
+	PSIL_SA2UL(0xf501, 1),
+};
+
+struct psil_ep_map j721s2_ep_map = {
+	.name = "j721s2",
+	.src = j721s2_src_ep_map,
+	.src_count = ARRAY_SIZE(j721s2_src_ep_map),
+	.dst = j721s2_dst_ep_map,
+	.dst_count = ARRAY_SIZE(j721s2_dst_ep_map),
+};
diff --git a/drivers/dma/ti/k3-psil-priv.h b/drivers/dma/ti/k3-psil-priv.h
index b74e192e3c2d..e51e179cdb56 100644
--- a/drivers/dma/ti/k3-psil-priv.h
+++ b/drivers/dma/ti/k3-psil-priv.h
@@ -41,5 +41,6 @@ extern struct psil_ep_map am654_ep_map;
 extern struct psil_ep_map j721e_ep_map;
 extern struct psil_ep_map j7200_ep_map;
 extern struct psil_ep_map am64_ep_map;
+extern struct psil_ep_map j721s2_ep_map;
 
 #endif /* K3_PSIL_PRIV_H_ */
diff --git a/drivers/dma/ti/k3-psil.c b/drivers/dma/ti/k3-psil.c
index 13ce7367d870..8867b4bd0c51 100644
--- a/drivers/dma/ti/k3-psil.c
+++ b/drivers/dma/ti/k3-psil.c
@@ -21,6 +21,7 @@ static const struct soc_device_attribute k3_soc_devices[] = {
 	{ .family = "J721E", .data = &j721e_ep_map },
 	{ .family = "J7200", .data = &j7200_ep_map },
 	{ .family = "AM64X", .data = &am64_ep_map },
+	{ .family = "J721S2", .data = &j721s2_ep_map },
 	{ /* sentinel */ }
 };
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] J721S2: Add initial support
  2021-11-19 13:23 [PATCH 0/2] J721S2: Add initial support Aswath Govindraju
  2021-11-19 13:23 ` [PATCH 1/2] dmaengine: ti: k3-udma: Add SoC dependent data for J721S2 SoC Aswath Govindraju
  2021-11-19 13:23 ` [PATCH 2/2] drivers: dma: ti: k3-psil: Add support for J721S2 Aswath Govindraju
@ 2021-11-22 18:08 ` Péter Ujfalusi
  2021-12-07 14:21 ` Aswath Govindraju
  2021-12-13  6:02 ` Vinod Koul
  4 siblings, 0 replies; 6+ messages in thread
From: Péter Ujfalusi @ 2021-11-22 18:08 UTC (permalink / raw)
  To: Aswath Govindraju
  Cc: Nishanth Menon, Vignesh Raghavendra, Kishon Vijay Abraham I,
	Vinod Koul, linux-kernel, dmaengine

Hi Aswath,

On 19/11/2021 15:23, Aswath Govindraju wrote:
> The following series of patches add support for J721S2 SoC.
> 
> Currently, the PSIL source and destination thread IDs for only a few of the
> IPs have been added. The remaning ones will be added as and when they are
> tested.

I would have added the complete map as the hardware is not going to
change (likely), but fine this way as well.

> The following series of patches are dependent on,
> - http://lists.infradead.org/pipermail/linux-arm-kernel/2021-November/697574.html

It is runtime dependency, so not an issue.

Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>

> Aswath Govindraju (2):
>   dmaengine: ti: k3-udma: Add SoC dependent data for J721S2 SoC
>   drivers: dma: ti: k3-psil: Add support for J721S2
> 
>  drivers/dma/ti/Makefile         |   3 +-
>  drivers/dma/ti/k3-psil-j721s2.c | 167 ++++++++++++++++++++++++++++++++
>  drivers/dma/ti/k3-psil-priv.h   |   1 +
>  drivers/dma/ti/k3-psil.c        |   1 +
>  drivers/dma/ti/k3-udma.c        |   1 +
>  5 files changed, 172 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/dma/ti/k3-psil-j721s2.c
> 

-- 
Péter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] J721S2: Add initial support
  2021-11-19 13:23 [PATCH 0/2] J721S2: Add initial support Aswath Govindraju
                   ` (2 preceding siblings ...)
  2021-11-22 18:08 ` [PATCH 0/2] J721S2: Add initial support Péter Ujfalusi
@ 2021-12-07 14:21 ` Aswath Govindraju
  2021-12-13  6:02 ` Vinod Koul
  4 siblings, 0 replies; 6+ messages in thread
From: Aswath Govindraju @ 2021-12-07 14:21 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Nishanth Menon, Vignesh Raghavendra, Kishon Vijay Abraham I,
	Peter Ujfalusi, linux-kernel, dmaengine

Hi Vinod,

On 19/11/21 6:53 pm, Aswath Govindraju wrote:
> The following series of patches add support for J721S2 SoC.
> 
> Currently, the PSIL source and destination thread IDs for only a few of the
> IPs have been added. The remaning ones will be added as and when they are
> tested.
> 
> The following series of patches are dependent on,
> - http://lists.infradead.org/pipermail/linux-arm-kernel/2021-November/697574.html
> 

May I know if this patch series can be applied to next? This series is a
dependency for [1].

[1] -
https://lore.kernel.org/linux-arm-kernel/20211207080904.14324-3-a-govindraju@ti.com/T/

Thanks,
Aswath

> Aswath Govindraju (2):
>   dmaengine: ti: k3-udma: Add SoC dependent data for J721S2 SoC
>   drivers: dma: ti: k3-psil: Add support for J721S2
> 
>  drivers/dma/ti/Makefile         |   3 +-
>  drivers/dma/ti/k3-psil-j721s2.c | 167 ++++++++++++++++++++++++++++++++
>  drivers/dma/ti/k3-psil-priv.h   |   1 +
>  drivers/dma/ti/k3-psil.c        |   1 +
>  drivers/dma/ti/k3-udma.c        |   1 +
>  5 files changed, 172 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/dma/ti/k3-psil-j721s2.c
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] J721S2: Add initial support
  2021-11-19 13:23 [PATCH 0/2] J721S2: Add initial support Aswath Govindraju
                   ` (3 preceding siblings ...)
  2021-12-07 14:21 ` Aswath Govindraju
@ 2021-12-13  6:02 ` Vinod Koul
  4 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2021-12-13  6:02 UTC (permalink / raw)
  To: Aswath Govindraju
  Cc: Nishanth Menon, Vignesh Raghavendra, Kishon Vijay Abraham I,
	Peter Ujfalusi, linux-kernel, dmaengine

On 19-11-21, 18:53, Aswath Govindraju wrote:
> The following series of patches add support for J721S2 SoC.
> 
> Currently, the PSIL source and destination thread IDs for only a few of the
> IPs have been added. The remaning ones will be added as and when they are
> tested.
> 
> The following series of patches are dependent on,
> - http://lists.infradead.org/pipermail/linux-arm-kernel/2021-November/697574.html

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-13  6:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 13:23 [PATCH 0/2] J721S2: Add initial support Aswath Govindraju
2021-11-19 13:23 ` [PATCH 1/2] dmaengine: ti: k3-udma: Add SoC dependent data for J721S2 SoC Aswath Govindraju
2021-11-19 13:23 ` [PATCH 2/2] drivers: dma: ti: k3-psil: Add support for J721S2 Aswath Govindraju
2021-11-22 18:08 ` [PATCH 0/2] J721S2: Add initial support Péter Ujfalusi
2021-12-07 14:21 ` Aswath Govindraju
2021-12-13  6:02 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).