diff mbox series

[v2,6/6] remoteproc/pru: Add support for various PRU cores on K3 J721E SoCs

Message ID 20201119140850.12268-7-grzegorz.jaszczyk@linaro.org (mailing list archive)
State Superseded
Headers show
Series Add a PRU remoteproc driver | expand

Commit Message

Grzegorz Jaszczyk Nov. 19, 2020, 2:08 p.m. UTC
From: Suman Anna <s-anna@ti.com>

The K3 J721E family of SoCs have a revised version of the AM65x ICSSG IP
and contains two instances of this newer ICSSG IP. Each ICSSG processor
subsystem contains 2 primary PRU cores, 2 auxiliary PRU cores called RTUs,
and 2 new auxiliary cores called Transmit PRUs (Tx_PRUs).

Enhance the existing PRU remoteproc driver to support these new PRU
and RTU cores by using specific compatibles. The cores have the same
memory copying limitations as on AM65x, so reuses the custom memcpy
function within the driver's ELF loader implementation. The initial
names for the firmware images for each PRU core are retrieved from
DT nodes, and can be adjusted through sysfs if required.

Signed-off-by: Suman Anna <s-anna@ti.com>
Co-developed-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
---
 drivers/remoteproc/pru_rproc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Mathieu Poirier Dec. 3, 2020, 6:53 p.m. UTC | #1
On Thu, Nov 19, 2020 at 03:08:50PM +0100, Grzegorz Jaszczyk wrote:
> From: Suman Anna <s-anna@ti.com>
> 
> The K3 J721E family of SoCs have a revised version of the AM65x ICSSG IP
> and contains two instances of this newer ICSSG IP. Each ICSSG processor
> subsystem contains 2 primary PRU cores, 2 auxiliary PRU cores called RTUs,
> and 2 new auxiliary cores called Transmit PRUs (Tx_PRUs).
> 
> Enhance the existing PRU remoteproc driver to support these new PRU
> and RTU cores by using specific compatibles. The cores have the same
> memory copying limitations as on AM65x, so reuses the custom memcpy
> function within the driver's ELF loader implementation. The initial
> names for the firmware images for each PRU core are retrieved from
> DT nodes, and can be adjusted through sysfs if required.
> 
> Signed-off-by: Suman Anna <s-anna@ti.com>
> Co-developed-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
> Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>

> ---
>  drivers/remoteproc/pru_rproc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c
> index 48c1c51e0d42..96f689283a8b 100644
> --- a/drivers/remoteproc/pru_rproc.c
> +++ b/drivers/remoteproc/pru_rproc.c
> @@ -852,6 +852,9 @@ static const struct of_device_id pru_rproc_match[] = {
>  	{ .compatible = "ti,am654-pru",		.data = &k3_pru_data },
>  	{ .compatible = "ti,am654-rtu",		.data = &k3_rtu_data },
>  	{ .compatible = "ti,am654-tx-pru",	.data = &k3_tx_pru_data },
> +	{ .compatible = "ti,j721e-pru",		.data = &k3_pru_data },
> +	{ .compatible = "ti,j721e-rtu",		.data = &k3_rtu_data },
> +	{ .compatible = "ti,j721e-tx-pru",	.data = &k3_tx_pru_data },
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, pru_rproc_match);
> -- 
> 2.29.0
>
Grzegorz Jaszczyk Dec. 4, 2020, 2:14 p.m. UTC | #2
Hi Mathieu,

On Thu, 3 Dec 2020 at 19:53, Mathieu Poirier <mathieu.poirier@linaro.org> wrote:
>
> On Thu, Nov 19, 2020 at 03:08:50PM +0100, Grzegorz Jaszczyk wrote:
> > From: Suman Anna <s-anna@ti.com>
> >
> > The K3 J721E family of SoCs have a revised version of the AM65x ICSSG IP
> > and contains two instances of this newer ICSSG IP. Each ICSSG processor
> > subsystem contains 2 primary PRU cores, 2 auxiliary PRU cores called RTUs,
> > and 2 new auxiliary cores called Transmit PRUs (Tx_PRUs).
> >
> > Enhance the existing PRU remoteproc driver to support these new PRU
> > and RTU cores by using specific compatibles. The cores have the same
> > memory copying limitations as on AM65x, so reuses the custom memcpy
> > function within the driver's ELF loader implementation. The initial
> > names for the firmware images for each PRU core are retrieved from
> > DT nodes, and can be adjusted through sysfs if required.
> >
> > Signed-off-by: Suman Anna <s-anna@ti.com>
> > Co-developed-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
> > Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
>
> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>

Thank you for all your review,
Grzegorz

>
> > ---
> >  drivers/remoteproc/pru_rproc.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c
> > index 48c1c51e0d42..96f689283a8b 100644
> > --- a/drivers/remoteproc/pru_rproc.c
> > +++ b/drivers/remoteproc/pru_rproc.c
> > @@ -852,6 +852,9 @@ static const struct of_device_id pru_rproc_match[] = {
> >       { .compatible = "ti,am654-pru",         .data = &k3_pru_data },
> >       { .compatible = "ti,am654-rtu",         .data = &k3_rtu_data },
> >       { .compatible = "ti,am654-tx-pru",      .data = &k3_tx_pru_data },
> > +     { .compatible = "ti,j721e-pru",         .data = &k3_pru_data },
> > +     { .compatible = "ti,j721e-rtu",         .data = &k3_rtu_data },
> > +     { .compatible = "ti,j721e-tx-pru",      .data = &k3_tx_pru_data },
> >       {},
> >  };
> >  MODULE_DEVICE_TABLE(of, pru_rproc_match);
> > --
> > 2.29.0
> >
diff mbox series

Patch

diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c
index 48c1c51e0d42..96f689283a8b 100644
--- a/drivers/remoteproc/pru_rproc.c
+++ b/drivers/remoteproc/pru_rproc.c
@@ -852,6 +852,9 @@  static const struct of_device_id pru_rproc_match[] = {
 	{ .compatible = "ti,am654-pru",		.data = &k3_pru_data },
 	{ .compatible = "ti,am654-rtu",		.data = &k3_rtu_data },
 	{ .compatible = "ti,am654-tx-pru",	.data = &k3_tx_pru_data },
+	{ .compatible = "ti,j721e-pru",		.data = &k3_pru_data },
+	{ .compatible = "ti,j721e-rtu",		.data = &k3_rtu_data },
+	{ .compatible = "ti,j721e-tx-pru",	.data = &k3_tx_pru_data },
 	{},
 };
 MODULE_DEVICE_TABLE(of, pru_rproc_match);