diff mbox series

remoteproc: imx_rproc: correct i.MX93 DRAM mapping

Message ID 20221102111410.38737-1-peng.fan@oss.nxp.com (mailing list archive)
State Accepted
Headers show
Series remoteproc: imx_rproc: correct i.MX93 DRAM mapping | expand

Commit Message

Peng Fan (OSS) Nov. 2, 2022, 11:14 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

According to updated reference mannual, the M33 DRAM view of
0x[C,D]0000000 maps to A55 0xC0000000, so correct it.

Fixes: 9222fabf0e39 ("remoteproc: imx_rproc: Support i.MX93")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/remoteproc/imx_rproc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mathieu Poirier Nov. 2, 2022, 5:40 p.m. UTC | #1
On Wed, 2 Nov 2022 at 05:12, Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> According to updated reference mannual, the M33 DRAM view of
> 0x[C,D]0000000 maps to A55 0xC0000000, so correct it.
>
> Fixes: 9222fabf0e39 ("remoteproc: imx_rproc: Support i.MX93")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/remoteproc/imx_rproc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index 2c471e46f4ca..9fc978e0393c 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -134,8 +134,8 @@ static const struct imx_rproc_att imx_rproc_att_imx93[] = {
>         { 0x80000000, 0x80000000, 0x10000000, 0 },
>         { 0x90000000, 0x80000000, 0x10000000, 0 },
>
> -       { 0xC0000000, 0xa0000000, 0x10000000, 0 },
> -       { 0xD0000000, 0xa0000000, 0x10000000, 0 },
> +       { 0xC0000000, 0xC0000000, 0x10000000, 0 },
> +       { 0xD0000000, 0xC0000000, 0x10000000, 0 },

But how did this work before?  Were some SoC released with the old mapping?

>  };
>
>  static const struct imx_rproc_att imx_rproc_att_imx8qm[] = {
> --
> 2.37.1
>
Peng Fan Nov. 3, 2022, 6:11 a.m. UTC | #2
> Subject: Re: [PATCH] remoteproc: imx_rproc: correct i.MX93 DRAM mapping
> 
> On Wed, 2 Nov 2022 at 05:12, Peng Fan (OSS) <peng.fan@oss.nxp.com>
> wrote:
> >
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > According to updated reference mannual, the M33 DRAM view of
> > 0x[C,D]0000000 maps to A55 0xC0000000, so correct it.
> >
> > Fixes: 9222fabf0e39 ("remoteproc: imx_rproc: Support i.MX93")
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  drivers/remoteproc/imx_rproc.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/remoteproc/imx_rproc.c
> > b/drivers/remoteproc/imx_rproc.c index 2c471e46f4ca..9fc978e0393c
> > 100644
> > --- a/drivers/remoteproc/imx_rproc.c
> > +++ b/drivers/remoteproc/imx_rproc.c
> > @@ -134,8 +134,8 @@ static const struct imx_rproc_att
> imx_rproc_att_imx93[] = {
> >         { 0x80000000, 0x80000000, 0x10000000, 0 },
> >         { 0x90000000, 0x80000000, 0x10000000, 0 },
> >
> > -       { 0xC0000000, 0xa0000000, 0x10000000, 0 },
> > -       { 0xD0000000, 0xa0000000, 0x10000000, 0 },
> > +       { 0xC0000000, 0xC0000000, 0x10000000, 0 },
> > +       { 0xD0000000, 0xC0000000, 0x10000000, 0 },
> 
> But how did this work before?  Were some SoC released with the old
> mapping?
The current m33 firmware release with Linux SDK only has
TCM version, so I not have image to test the DDR mapping. 

Initially we got the information that M33 mapping of DRAM.
DRAM (offset 0 MB)	DRAM	80000000
DRAM (offset 256 MB)	DRAM	A0000000
DRAM (offset 512 MB)	DRAM	C0000000

However the information is wrong after we check more,
there is an 256MB hole, 0MB [0x80000000, 0x8fffffff],
512MB [0xa0000000, 0xafffffff], 
1024MB [0xc0000000, 0xcfffffff]

I use JTAG to confirm it.

Thanks,
Peng.
> 
> >  };
> >
> >  static const struct imx_rproc_att imx_rproc_att_imx8qm[] = {
> > --
> > 2.37.1
> >
Mathieu Poirier Nov. 4, 2022, 3:27 p.m. UTC | #3
On Thu, Nov 03, 2022 at 06:11:46AM +0000, Peng Fan wrote:
> > Subject: Re: [PATCH] remoteproc: imx_rproc: correct i.MX93 DRAM mapping
> > 
> > On Wed, 2 Nov 2022 at 05:12, Peng Fan (OSS) <peng.fan@oss.nxp.com>
> > wrote:
> > >
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > According to updated reference mannual, the M33 DRAM view of
> > > 0x[C,D]0000000 maps to A55 0xC0000000, so correct it.
> > >
> > > Fixes: 9222fabf0e39 ("remoteproc: imx_rproc: Support i.MX93")
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > >  drivers/remoteproc/imx_rproc.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/remoteproc/imx_rproc.c
> > > b/drivers/remoteproc/imx_rproc.c index 2c471e46f4ca..9fc978e0393c
> > > 100644
> > > --- a/drivers/remoteproc/imx_rproc.c
> > > +++ b/drivers/remoteproc/imx_rproc.c
> > > @@ -134,8 +134,8 @@ static const struct imx_rproc_att
> > imx_rproc_att_imx93[] = {
> > >         { 0x80000000, 0x80000000, 0x10000000, 0 },
> > >         { 0x90000000, 0x80000000, 0x10000000, 0 },
> > >
> > > -       { 0xC0000000, 0xa0000000, 0x10000000, 0 },
> > > -       { 0xD0000000, 0xa0000000, 0x10000000, 0 },
> > > +       { 0xC0000000, 0xC0000000, 0x10000000, 0 },
> > > +       { 0xD0000000, 0xC0000000, 0x10000000, 0 },
> > 
> > But how did this work before?  Were some SoC released with the old
> > mapping?

As it is regularly the case, you have not answered all my questions.

> The current m33 firmware release with Linux SDK only has
> TCM version, so I not have image to test the DDR mapping. 
> 
> Initially we got the information that M33 mapping of DRAM.
> DRAM (offset 0 MB)	DRAM	80000000
> DRAM (offset 256 MB)	DRAM	A0000000
> DRAM (offset 512 MB)	DRAM	C0000000
> 
> However the information is wrong after we check more,
> there is an 256MB hole, 0MB [0x80000000, 0x8fffffff],
> 512MB [0xa0000000, 0xafffffff], 
> 1024MB [0xc0000000, 0xcfffffff]
> 
> I use JTAG to confirm it.
> 
> Thanks,
> Peng.
> > 
> > >  };
> > >
> > >  static const struct imx_rproc_att imx_rproc_att_imx8qm[] = {
> > > --
> > > 2.37.1
> > >
Peng Fan Nov. 7, 2022, 12:27 a.m. UTC | #4
> -----Original Message-----
> From: Mathieu Poirier <mathieu.poirier@linaro.org>
> Sent: 2022年11月4日 23:28
> To: Peng Fan <peng.fan@nxp.com>
> Cc: Peng Fan (OSS) <peng.fan@oss.nxp.com>; andersson@kernel.org;
> shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de;
> festevam@gmail.com; dl-linux-imx <linux-imx@nxp.com>; linux-
> remoteproc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH] remoteproc: imx_rproc: correct i.MX93 DRAM mapping
> 
> On Thu, Nov 03, 2022 at 06:11:46AM +0000, Peng Fan wrote:
> > > Subject: Re: [PATCH] remoteproc: imx_rproc: correct i.MX93 DRAM
> > > mapping
> > >
> > > On Wed, 2 Nov 2022 at 05:12, Peng Fan (OSS) <peng.fan@oss.nxp.com>
> > > wrote:
> > > >
> > > > From: Peng Fan <peng.fan@nxp.com>
> > > >
> > > > According to updated reference mannual, the M33 DRAM view of
> > > > 0x[C,D]0000000 maps to A55 0xC0000000, so correct it.
> > > >
> > > > Fixes: 9222fabf0e39 ("remoteproc: imx_rproc: Support i.MX93")
> > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > ---
> > > >  drivers/remoteproc/imx_rproc.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/remoteproc/imx_rproc.c
> > > > b/drivers/remoteproc/imx_rproc.c index 2c471e46f4ca..9fc978e0393c
> > > > 100644
> > > > --- a/drivers/remoteproc/imx_rproc.c
> > > > +++ b/drivers/remoteproc/imx_rproc.c
> > > > @@ -134,8 +134,8 @@ static const struct imx_rproc_att
> > > imx_rproc_att_imx93[] = {
> > > >         { 0x80000000, 0x80000000, 0x10000000, 0 },
> > > >         { 0x90000000, 0x80000000, 0x10000000, 0 },
> > > >
> > > > -       { 0xC0000000, 0xa0000000, 0x10000000, 0 },
> > > > -       { 0xD0000000, 0xa0000000, 0x10000000, 0 },
> > > > +       { 0xC0000000, 0xC0000000, 0x10000000, 0 },
> > > > +       { 0xD0000000, 0xC0000000, 0x10000000, 0 },
> > >
> > > But how did this work before?  Were some SoC released with the old
> > > mapping?
> 
> As it is regularly the case, you have not answered all my questions.

The DRAM mapping was not tested, I just wrote them down according
to the information I had.  In this patch, I just fix the mapping at address
0xC0000000, I not add 0xA0000000, I may also add it or use a separate
patch, which would you prefer?

The i.MX93 SoC is still in pre-production phase, and there is no public
Information for now.

Regards,
Peng.
> 
> > The current m33 firmware release with Linux SDK only has TCM version,
> > so I not have image to test the DDR mapping.
> >
> > Initially we got the information that M33 mapping of DRAM.
> > DRAM (offset 0 MB)	DRAM	80000000
> > DRAM (offset 256 MB)	DRAM	A0000000
> > DRAM (offset 512 MB)	DRAM	C0000000
> >
> > However the information is wrong after we check more, there is an
> > 256MB hole, 0MB [0x80000000, 0x8fffffff], 512MB [0xa0000000,
> > 0xafffffff], 1024MB [0xc0000000, 0xcfffffff]
> >
> > I use JTAG to confirm it.
> >
> > Thanks,
> > Peng.
> > >
> > > >  };
> > > >
> > > >  static const struct imx_rproc_att imx_rproc_att_imx8qm[] = {
> > > > --
> > > > 2.37.1
> > > >
Mathieu Poirier Nov. 15, 2022, 6:33 p.m. UTC | #5
On Mon, Nov 07, 2022 at 12:27:58AM +0000, Peng Fan wrote:
> 
> 
> > -----Original Message-----
> > From: Mathieu Poirier <mathieu.poirier@linaro.org>
> > Sent: 2022年11月4日 23:28
> > To: Peng Fan <peng.fan@nxp.com>
> > Cc: Peng Fan (OSS) <peng.fan@oss.nxp.com>; andersson@kernel.org;
> > shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de;
> > festevam@gmail.com; dl-linux-imx <linux-imx@nxp.com>; linux-
> > remoteproc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> > kernel@vger.kernel.org
> > Subject: Re: [PATCH] remoteproc: imx_rproc: correct i.MX93 DRAM mapping
> > 
> > On Thu, Nov 03, 2022 at 06:11:46AM +0000, Peng Fan wrote:
> > > > Subject: Re: [PATCH] remoteproc: imx_rproc: correct i.MX93 DRAM
> > > > mapping
> > > >
> > > > On Wed, 2 Nov 2022 at 05:12, Peng Fan (OSS) <peng.fan@oss.nxp.com>
> > > > wrote:
> > > > >
> > > > > From: Peng Fan <peng.fan@nxp.com>
> > > > >
> > > > > According to updated reference mannual, the M33 DRAM view of
> > > > > 0x[C,D]0000000 maps to A55 0xC0000000, so correct it.
> > > > >
> > > > > Fixes: 9222fabf0e39 ("remoteproc: imx_rproc: Support i.MX93")
> > > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > > ---
> > > > >  drivers/remoteproc/imx_rproc.c | 4 ++--
> > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/drivers/remoteproc/imx_rproc.c
> > > > > b/drivers/remoteproc/imx_rproc.c index 2c471e46f4ca..9fc978e0393c
> > > > > 100644
> > > > > --- a/drivers/remoteproc/imx_rproc.c
> > > > > +++ b/drivers/remoteproc/imx_rproc.c
> > > > > @@ -134,8 +134,8 @@ static const struct imx_rproc_att
> > > > imx_rproc_att_imx93[] = {
> > > > >         { 0x80000000, 0x80000000, 0x10000000, 0 },
> > > > >         { 0x90000000, 0x80000000, 0x10000000, 0 },
> > > > >
> > > > > -       { 0xC0000000, 0xa0000000, 0x10000000, 0 },
> > > > > -       { 0xD0000000, 0xa0000000, 0x10000000, 0 },
> > > > > +       { 0xC0000000, 0xC0000000, 0x10000000, 0 },
> > > > > +       { 0xD0000000, 0xC0000000, 0x10000000, 0 },
> > > >
> > > > But how did this work before?  Were some SoC released with the old
> > > > mapping?
> > 
> > As it is regularly the case, you have not answered all my questions.
> 
> The DRAM mapping was not tested, I just wrote them down according
> to the information I had.  In this patch, I just fix the mapping at address
> 0xC0000000, I not add 0xA0000000, I may also add it or use a separate
> patch, which would you prefer?

Seperate patch?  This is a seperate patch...

> 
> The i.MX93 SoC is still in pre-production phase, and there is no public
> Information for now.
>

That is all I wanted to know.  Other implementation can't be affected by this
change because the sillicon is still under development.  Simple isn't?

I am applying this patch.

> Regards,
> Peng.
> > 
> > > The current m33 firmware release with Linux SDK only has TCM version,
> > > so I not have image to test the DDR mapping.
> > >
> > > Initially we got the information that M33 mapping of DRAM.
> > > DRAM (offset 0 MB)	DRAM	80000000
> > > DRAM (offset 256 MB)	DRAM	A0000000
> > > DRAM (offset 512 MB)	DRAM	C0000000
> > >
> > > However the information is wrong after we check more, there is an
> > > 256MB hole, 0MB [0x80000000, 0x8fffffff], 512MB [0xa0000000,
> > > 0xafffffff], 1024MB [0xc0000000, 0xcfffffff]
> > >
> > > I use JTAG to confirm it.
> > >
> > > Thanks,
> > > Peng.
> > > >
> > > > >  };
> > > > >
> > > > >  static const struct imx_rproc_att imx_rproc_att_imx8qm[] = {
> > > > > --
> > > > > 2.37.1
> > > > >
Peng Fan Nov. 16, 2022, 2:52 a.m. UTC | #6
> Subject: Re: [PATCH] remoteproc: imx_rproc: correct i.MX93 DRAM mapping
> 
> On Mon, Nov 07, 2022 at 12:27:58AM +0000, Peng Fan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Mathieu Poirier <mathieu.poirier@linaro.org>
> > > Sent: 2022年11月4日 23:28
> > > To: Peng Fan <peng.fan@nxp.com>
> > > Cc: Peng Fan (OSS) <peng.fan@oss.nxp.com>; andersson@kernel.org;
> > > shawnguo@kernel.org; s.hauer@pengutronix.de;
> kernel@pengutronix.de;
> > > festevam@gmail.com; dl-linux-imx <linux-imx@nxp.com>; linux-
> > > remoteproc@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > linux- kernel@vger.kernel.org
> > > Subject: Re: [PATCH] remoteproc: imx_rproc: correct i.MX93 DRAM
> > > mapping
> > >
> > > On Thu, Nov 03, 2022 at 06:11:46AM +0000, Peng Fan wrote:
> > > > > Subject: Re: [PATCH] remoteproc: imx_rproc: correct i.MX93 DRAM
> > > > > mapping
> > > > >
> > > > > On Wed, 2 Nov 2022 at 05:12, Peng Fan (OSS)
> > > > > <peng.fan@oss.nxp.com>
> > > > > wrote:
> > > > > >
> > > > > > From: Peng Fan <peng.fan@nxp.com>
> > > > > >
> > > > > > According to updated reference mannual, the M33 DRAM view of
> > > > > > 0x[C,D]0000000 maps to A55 0xC0000000, so correct it.
> > > > > >
> > > > > > Fixes: 9222fabf0e39 ("remoteproc: imx_rproc: Support i.MX93")
> > > > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > > > ---
> > > > > >  drivers/remoteproc/imx_rproc.c | 4 ++--
> > > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/remoteproc/imx_rproc.c
> > > > > > b/drivers/remoteproc/imx_rproc.c index
> > > > > > 2c471e46f4ca..9fc978e0393c
> > > > > > 100644
> > > > > > --- a/drivers/remoteproc/imx_rproc.c
> > > > > > +++ b/drivers/remoteproc/imx_rproc.c
> > > > > > @@ -134,8 +134,8 @@ static const struct imx_rproc_att
> > > > > imx_rproc_att_imx93[] = {
> > > > > >         { 0x80000000, 0x80000000, 0x10000000, 0 },
> > > > > >         { 0x90000000, 0x80000000, 0x10000000, 0 },
> > > > > >
> > > > > > -       { 0xC0000000, 0xa0000000, 0x10000000, 0 },
> > > > > > -       { 0xD0000000, 0xa0000000, 0x10000000, 0 },
> > > > > > +       { 0xC0000000, 0xC0000000, 0x10000000, 0 },
> > > > > > +       { 0xD0000000, 0xC0000000, 0x10000000, 0 },
> > > > >
> > > > > But how did this work before?  Were some SoC released with the
> > > > > old mapping?
> > >
> > > As it is regularly the case, you have not answered all my questions.
> >
> > The DRAM mapping was not tested, I just wrote them down according to
> > the information I had.  In this patch, I just fix the mapping at
> > address 0xC0000000, I not add 0xA0000000, I may also add it or use a
> > separate patch, which would you prefer?
> 
> Seperate patch?  This is a seperate patch...

I mean the DRAM mapping still not cover 0xA0000000, 0xB0000000.  The
current mapping is below:
        /* DDR */
        { 0x80000000, 0x80000000, 0x10000000, 0 },
        { 0x90000000, 0x80000000, 0x10000000, 0 },

        { 0xC0000000, 0xc0000000, 0x10000000, 0 },
        { 0xD0000000, 0xc0000000, 0x10000000, 0 },

For 0xA/B0000000, I could add later when I get an M33 image that
really use that address in future.
> 
> >
> > The i.MX93 SoC is still in pre-production phase, and there is no
> > public Information for now.
> >
> 
> That is all I wanted to know.  Other implementation can't be affected by this
> change because the sillicon is still under development.  Simple isn't?
> 
> I am applying this patch.

Others are not affected.

Thanks,
Peng.
> 
> > Regards,
> > Peng.
> > >
> > > > The current m33 firmware release with Linux SDK only has TCM
> > > > version, so I not have image to test the DDR mapping.
> > > >
> > > > Initially we got the information that M33 mapping of DRAM.
> > > > DRAM (offset 0 MB)	DRAM	80000000
> > > > DRAM (offset 256 MB)	DRAM	A0000000
> > > > DRAM (offset 512 MB)	DRAM	C0000000
> > > >
> > > > However the information is wrong after we check more, there is an
> > > > 256MB hole, 0MB [0x80000000, 0x8fffffff], 512MB [0xa0000000,
> > > > 0xafffffff], 1024MB [0xc0000000, 0xcfffffff]
> > > >
> > > > I use JTAG to confirm it.
> > > >
> > > > Thanks,
> > > > Peng.
> > > > >
> > > > > >  };
> > > > > >
> > > > > >  static const struct imx_rproc_att imx_rproc_att_imx8qm[] = {
> > > > > > --
> > > > > > 2.37.1
> > > > > >
diff mbox series

Patch

diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 2c471e46f4ca..9fc978e0393c 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -134,8 +134,8 @@  static const struct imx_rproc_att imx_rproc_att_imx93[] = {
 	{ 0x80000000, 0x80000000, 0x10000000, 0 },
 	{ 0x90000000, 0x80000000, 0x10000000, 0 },
 
-	{ 0xC0000000, 0xa0000000, 0x10000000, 0 },
-	{ 0xD0000000, 0xa0000000, 0x10000000, 0 },
+	{ 0xC0000000, 0xC0000000, 0x10000000, 0 },
+	{ 0xD0000000, 0xC0000000, 0x10000000, 0 },
 };
 
 static const struct imx_rproc_att imx_rproc_att_imx8qm[] = {