diff mbox series

[2/3] firmware: imx: scu-pd: Add mu_b side PD range

Message ID 20190703190404.21136-3-daniel.baluta@nxp.com (mailing list archive)
State New, archived
Headers show
Series Add power domain range for MU side b / IRQSTR_DSP | expand

Commit Message

Daniel Baluta July 3, 2019, 7:04 p.m. UTC
LSIO subsystem contains 14 MU instances.

5 MUs to communicate between AP <-> SCU
  - side-A PD range managed by AP
  - side-B PD range managed by SCU

9 MUs to communicate between AP <-> M4
  - side-A PD range managed by AP
  - side-B PD range managed by AP

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 drivers/firmware/imx/scu-pd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Aisheng Dong July 18, 2019, 3:29 a.m. UTC | #1
> From: Daniel Baluta <daniel.baluta@nxp.com>
> Sent: Thursday, July 4, 2019 3:04 AM
> Subject: [PATCH 2/3] firmware: imx: scu-pd: Add mu_b side PD range
> 
> LSIO subsystem contains 14 MU instances.
> 
> 5 MUs to communicate between AP <-> SCU
>   - side-A PD range managed by AP
>   - side-B PD range managed by SCU
> 
> 9 MUs to communicate between AP <-> M4

The left 9MUs are general and can be used by all cores,
e.g AP/M4/DSP.
So below description is not correct.

>   - side-A PD range managed by AP
>   - side-B PD range managed by AP
> 
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
>  drivers/firmware/imx/scu-pd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c
> index 950d30238186..30adc3104347 100644
> --- a/drivers/firmware/imx/scu-pd.c
> +++ b/drivers/firmware/imx/scu-pd.c
> @@ -93,6 +93,7 @@ static const struct imx_sc_pd_range
> imx8qxp_scu_pd_ranges[] = {
>  	{ "kpp", IMX_SC_R_KPP, 1, false, 0 },
>  	{ "fspi", IMX_SC_R_FSPI_0, 2, true, 0 },
>  	{ "mu_a", IMX_SC_R_MU_0A, 14, true, 0 },
> +	{ "mu_b", IMX_SC_R_MU_5B, 9, true, 0 },

Should start from 5?
{ "mu_b", IMX_SC_R_MU_5B, 9, true, 5 },

Regards
Aisheng

> 
>  	/* CONN SS */
>  	{ "usb", IMX_SC_R_USB_0, 2, true, 0 },
> --
> 2.17.1
Daniel Baluta July 18, 2019, 6:38 a.m. UTC | #2
On Thu, Jul 18, 2019 at 6:30 AM Aisheng Dong <aisheng.dong@nxp.com> wrote:
>
> > From: Daniel Baluta <daniel.baluta@nxp.com>
> > Sent: Thursday, July 4, 2019 3:04 AM
> > Subject: [PATCH 2/3] firmware: imx: scu-pd: Add mu_b side PD range
> >
> > LSIO subsystem contains 14 MU instances.
> >
> > 5 MUs to communicate between AP <-> SCU
> >   - side-A PD range managed by AP
> >   - side-B PD range managed by SCU
> >
> > 9 MUs to communicate between AP <-> M4
>
> The left 9MUs are general and can be used by all cores,
> e.g AP/M4/DSP.
> So below description is not correct.
>
Indeed. In the particular case of the DSP it is true.

I don't know exactly who will use MUs 5..12. I only
know that MU 13 is assigned to DSP and we prefer
to power up side-b from AP because powering up
from DSP would be a pain.

This means that DSP needs a way to communicate with SCU
so basically it needs another MU for that.

> >   - side-A PD range managed by AP
> >   - side-B PD range managed by AP
> >
> > Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> > ---
> >  drivers/firmware/imx/scu-pd.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c
> > index 950d30238186..30adc3104347 100644
> > --- a/drivers/firmware/imx/scu-pd.c
> > +++ b/drivers/firmware/imx/scu-pd.c
> > @@ -93,6 +93,7 @@ static const struct imx_sc_pd_range
> > imx8qxp_scu_pd_ranges[] = {
> >       { "kpp", IMX_SC_R_KPP, 1, false, 0 },
> >       { "fspi", IMX_SC_R_FSPI_0, 2, true, 0 },
> >       { "mu_a", IMX_SC_R_MU_0A, 14, true, 0 },
> > +     { "mu_b", IMX_SC_R_MU_5B, 9, true, 0 },
>
> Should start from 5?
> { "mu_b", IMX_SC_R_MU_5B, 9, true, 5 },

I guess you are right. I think start_from is used
to form the pd name, because the actual rsrc
is computed as follows:

sc_pd->rsrc = pd_ranges->rsrc + idx;

So, I think for this reason it just worked for me.

Anyhow, I'm thinking about powering up only MU13_B from AP side
and let the user of other MU sides B to decide from themselves.

So, the change will be:

> > +     { "mu_b", IMX_SC_R_MU_13B, 1, true, 13 },

Will send v2 asap.
diff mbox series

Patch

diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c
index 950d30238186..30adc3104347 100644
--- a/drivers/firmware/imx/scu-pd.c
+++ b/drivers/firmware/imx/scu-pd.c
@@ -93,6 +93,7 @@  static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
 	{ "kpp", IMX_SC_R_KPP, 1, false, 0 },
 	{ "fspi", IMX_SC_R_FSPI_0, 2, true, 0 },
 	{ "mu_a", IMX_SC_R_MU_0A, 14, true, 0 },
+	{ "mu_b", IMX_SC_R_MU_5B, 9, true, 0 },
 
 	/* CONN SS */
 	{ "usb", IMX_SC_R_USB_0, 2, true, 0 },