All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: NOC (interconnect) lockup on i.MX8MP during resume
Date: Thu, 09 Mar 2023 16:17:00 +0100	[thread overview]
Message-ID: <3777249.R56niFO833@steina-w> (raw)
In-Reply-To: <700de2ce-36f6-6140-92d5-75175eb709d6@pengutronix.de>

Hi Ahmad,

Am Donnerstag, 9. März 2023, 16:03:26 CET schrieb Ahmad Fatoum:
> Hello Alexander,
> 
> On 09.03.23 15:57, Alexander Stein wrote:
> > Hi,
> > 
> > while debugging another issue regarding suspend/resume I noticed that the
> > imx interconnect driver locks up the system when writing into registers.
> > This happens during resume of the 'g2' power domain.
> > imx8m_blk_ctrl_power_on() will eventually call down to
> > imx_icc_node_set(). Using the debug diff furthe down I get this output:
> > 
> > [   71.493062] imx_icc_node_set: node: VPU G2
> > [   71.497163] imx_icc_node_set: peak_bw: 1
> > [   71.501091] imx_icc_node_set: prio: 0x80000303
> > <freeze here>
> > 
> > Unfortunately there is absolutely no documentation regarding NOC in the
> > reference manual, so no idea whats happening here.
> > This is on next-20230309 using imx8mp-tqma8mpql-mba8mpxl.dts with USB
> > disabled (prevents suspend) and Ethernet-PHY-IRQ disabled (the issue I'm
> > tackling).
> > Is there some idea what do in order to support resume on i.MX8MP?
> 
> Could it be that you don't have a fully featured 8MP, but a 8MPUL
> or 8MPL, which lacks VPUs? In that case, it's not enough to disable
> the VPU nodes in the DT, but you need to disable the VPU power domains as
> well.

That's reasonable to question this, but in this case this is a full-fledged 
8MP. I just noticed that during boot those settings are done as well and there 
I get the (expected) output:

[   12.696371] imx_icc_node_set: node: VPU G2
[   12.700472] imx_icc_node_set: peak_bw: 1
[   12.704401] imx_icc_node_set: prio: 0x80000303
[   12.708850] imx_icc_node_set: mode: 0x0
[   12.712691] imx_icc_node_set: ext_control: #0
[   12.717053] imx_icc_node_set: node: NOC_VIDEO
[   12.721419] imx_icc_node_set: peak_bw: 1

So there is something wrong during resume. Both clk_ignore_unused 
pd_ignore_unused did not help.

Best regards,
Alexander

> Cheers,
> Ahmad
> 
> > Best regards,
> > Alexander
> > 
> > ---8<---
> > diff --git a/drivers/interconnect/imx/imx.c
> > b/drivers/interconnect/imx/imx.c index 979ed610f704..93ec79cc7c06 100644
> > --- a/drivers/interconnect/imx/imx.c
> > +++ b/drivers/interconnect/imx/imx.c
> > @@ -44,13 +44,18 @@ static int imx_icc_node_set(struct icc_node *node)
> > 
> >         u32 prio;
> >         u64 freq;
> > 
> > +       pr_info("%s: node: %s\n", __func__, node->name);
> > +       pr_info("%s: peak_bw: %u\n", __func__, node->peak_bw);
> > 
> >         if (node_data->setting && node->peak_bw) {
> >         
> >                 base = node_data->setting->reg +
> >                 node_data->imx_provider->noc_base;
> >                 if (node_data->setting->mode == IMX_NOC_MODE_FIXED) {
> >                 
> >                         prio = node_data->setting->prio_level;
> >                         prio = PRIORITY_COMP_MARK | (prio << 8) | prio;
> > 
> > +                       pr_info("%s: prio: %#x\n", __func__, prio);
> > 
> >                         writel(prio, base + IMX_NOC_PRIO_REG);
> > 
> > +                       pr_info("%s: mode: %#x\n", __func__,
> > node_data->setting->mode);> 
> >                         writel(node_data->setting->mode, base +
> >                         IMX_NOC_MODE_REG);
> > 
> > +                       pr_info("%s: ext_control: #%x\n", __func__,
> > node_data->setting->ext_control);> 
> >                         writel(node_data->setting->ext_control, base +
> >                         IMX_NOC_EXT_CTL_REG);
> >                         dev_dbg(dev, "%s: mode: 0x%x, prio: 0x%x,
> >                         ext_control: 0x%x\n",
> >                         
> >                                 node_data->desc->name,
> >                                 node_data->setting->mode, prio,
> > 
> > ---8<---


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



WARNING: multiple messages have this Message-ID (diff)
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: NOC (interconnect) lockup on i.MX8MP during resume
Date: Thu, 09 Mar 2023 16:17:00 +0100	[thread overview]
Message-ID: <3777249.R56niFO833@steina-w> (raw)
In-Reply-To: <700de2ce-36f6-6140-92d5-75175eb709d6@pengutronix.de>

Hi Ahmad,

Am Donnerstag, 9. März 2023, 16:03:26 CET schrieb Ahmad Fatoum:
> Hello Alexander,
> 
> On 09.03.23 15:57, Alexander Stein wrote:
> > Hi,
> > 
> > while debugging another issue regarding suspend/resume I noticed that the
> > imx interconnect driver locks up the system when writing into registers.
> > This happens during resume of the 'g2' power domain.
> > imx8m_blk_ctrl_power_on() will eventually call down to
> > imx_icc_node_set(). Using the debug diff furthe down I get this output:
> > 
> > [   71.493062] imx_icc_node_set: node: VPU G2
> > [   71.497163] imx_icc_node_set: peak_bw: 1
> > [   71.501091] imx_icc_node_set: prio: 0x80000303
> > <freeze here>
> > 
> > Unfortunately there is absolutely no documentation regarding NOC in the
> > reference manual, so no idea whats happening here.
> > This is on next-20230309 using imx8mp-tqma8mpql-mba8mpxl.dts with USB
> > disabled (prevents suspend) and Ethernet-PHY-IRQ disabled (the issue I'm
> > tackling).
> > Is there some idea what do in order to support resume on i.MX8MP?
> 
> Could it be that you don't have a fully featured 8MP, but a 8MPUL
> or 8MPL, which lacks VPUs? In that case, it's not enough to disable
> the VPU nodes in the DT, but you need to disable the VPU power domains as
> well.

That's reasonable to question this, but in this case this is a full-fledged 
8MP. I just noticed that during boot those settings are done as well and there 
I get the (expected) output:

[   12.696371] imx_icc_node_set: node: VPU G2
[   12.700472] imx_icc_node_set: peak_bw: 1
[   12.704401] imx_icc_node_set: prio: 0x80000303
[   12.708850] imx_icc_node_set: mode: 0x0
[   12.712691] imx_icc_node_set: ext_control: #0
[   12.717053] imx_icc_node_set: node: NOC_VIDEO
[   12.721419] imx_icc_node_set: peak_bw: 1

So there is something wrong during resume. Both clk_ignore_unused 
pd_ignore_unused did not help.

Best regards,
Alexander

> Cheers,
> Ahmad
> 
> > Best regards,
> > Alexander
> > 
> > ---8<---
> > diff --git a/drivers/interconnect/imx/imx.c
> > b/drivers/interconnect/imx/imx.c index 979ed610f704..93ec79cc7c06 100644
> > --- a/drivers/interconnect/imx/imx.c
> > +++ b/drivers/interconnect/imx/imx.c
> > @@ -44,13 +44,18 @@ static int imx_icc_node_set(struct icc_node *node)
> > 
> >         u32 prio;
> >         u64 freq;
> > 
> > +       pr_info("%s: node: %s\n", __func__, node->name);
> > +       pr_info("%s: peak_bw: %u\n", __func__, node->peak_bw);
> > 
> >         if (node_data->setting && node->peak_bw) {
> >         
> >                 base = node_data->setting->reg +
> >                 node_data->imx_provider->noc_base;
> >                 if (node_data->setting->mode == IMX_NOC_MODE_FIXED) {
> >                 
> >                         prio = node_data->setting->prio_level;
> >                         prio = PRIORITY_COMP_MARK | (prio << 8) | prio;
> > 
> > +                       pr_info("%s: prio: %#x\n", __func__, prio);
> > 
> >                         writel(prio, base + IMX_NOC_PRIO_REG);
> > 
> > +                       pr_info("%s: mode: %#x\n", __func__,
> > node_data->setting->mode);> 
> >                         writel(node_data->setting->mode, base +
> >                         IMX_NOC_MODE_REG);
> > 
> > +                       pr_info("%s: ext_control: #%x\n", __func__,
> > node_data->setting->ext_control);> 
> >                         writel(node_data->setting->ext_control, base +
> >                         IMX_NOC_EXT_CTL_REG);
> >                         dev_dbg(dev, "%s: mode: 0x%x, prio: 0x%x,
> >                         ext_control: 0x%x\n",
> >                         
> >                                 node_data->desc->name,
> >                                 node_data->setting->mode, prio,
> > 
> > ---8<---


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-03-09 15:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 14:57 NOC (interconnect) lockup on i.MX8MP during resume Alexander Stein
2023-03-09 14:57 ` Alexander Stein
2023-03-09 15:03 ` Ahmad Fatoum
2023-03-09 15:03   ` Ahmad Fatoum
2023-03-09 15:17   ` Alexander Stein [this message]
2023-03-09 15:17     ` Alexander Stein
2023-03-13 19:17 ` Adam Ford
2023-03-13 19:17   ` Adam Ford
2023-03-14  7:39   ` Alexander Stein
2023-03-14  7:39     ` Alexander Stein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3777249.R56niFO833@steina-w \
    --to=alexander.stein@ew.tq-group.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.