All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: Stephen Boyd <sboyd@kernel.org>,
	"Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	Abel Vesa <abel.vesa@nxp.com>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>
Cc: "kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH V2 1/2] clk: imx: add mcore_booted module paratemter
Date: Fri, 18 Mar 2022 01:14:14 +0000	[thread overview]
Message-ID: <PA4PR04MB9416A26024C1437162A2C9C688139@PA4PR04MB9416.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20220317193717.33264C340E9@smtp.kernel.org>

> Subject: Re: [PATCH V2 1/2] clk: imx: add mcore_booted module paratemter
> 
> Quoting Peng Fan (OSS) (2022-02-28 04:41:11)
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add mcore_booted boot parameter which could simplify AMP clock
> > management. To i.MX8M, there is CCM(clock control Module) to generate
> > clock root clock, anatop(analog PLL module) to generate PLL, and CCGR
> > (clock gating) to gate clocks to peripherals. As below:
> >   anatop->ccm->ccgr->peripheral
> >
> > Linux handles the clock management and the auxiliary core is under
> > control of Linux. Although there is per hardware domain control for
> > CCGR and CCM, auxiliary core normally only use CCGR hardware domain
> > control to avoid linux gate off the clk to peripherals and leave CCM
> > ana anatop to Linux.
> >
> > Per NXP hardware design, because CCGR already support gate to
> > peripherals, and clk root gate power leakage is negligible. So when in
> > AMP case, we could not register the clk root gate.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >
> > V2:
> >  Switch to use module parameter, tested on i.MX8MP-EVK
> 
> Why is a module parameter being used? I'd expect this informatioon that
> mcore is booted to come from devicetree/firmware somehow.

In i.MX platform design, mcore could be kicked by U-Boot or Linux remoteproc.
The hardware clk IP has CCM(clock root composite) and CCGR(clock gate).
CCGR support multiple hardware domain control, but CCM not.
Linux handles clock management, mcore only handles CCGR, so that means
Linux CCM operation maybe shutdown and cause CCGR has not clk input.

So when we need mcore run, we should not register CCM clk gate in
the composite. To mcore is booted by U-boot, we previous use information
from hardware, but to mcore is booted by remoteproc, we have no way,
because linux already registered all clocks.

So now we use a module parameter to let user decide.

Hope this is clear.

Thanks,
Peng.


WARNING: multiple messages have this Message-ID (diff)
From: Peng Fan <peng.fan@nxp.com>
To: Stephen Boyd <sboyd@kernel.org>,
	"Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	 Abel Vesa <abel.vesa@nxp.com>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>
Cc: "kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH V2 1/2] clk: imx: add mcore_booted module paratemter
Date: Fri, 18 Mar 2022 01:14:14 +0000	[thread overview]
Message-ID: <PA4PR04MB9416A26024C1437162A2C9C688139@PA4PR04MB9416.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20220317193717.33264C340E9@smtp.kernel.org>

> Subject: Re: [PATCH V2 1/2] clk: imx: add mcore_booted module paratemter
> 
> Quoting Peng Fan (OSS) (2022-02-28 04:41:11)
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add mcore_booted boot parameter which could simplify AMP clock
> > management. To i.MX8M, there is CCM(clock control Module) to generate
> > clock root clock, anatop(analog PLL module) to generate PLL, and CCGR
> > (clock gating) to gate clocks to peripherals. As below:
> >   anatop->ccm->ccgr->peripheral
> >
> > Linux handles the clock management and the auxiliary core is under
> > control of Linux. Although there is per hardware domain control for
> > CCGR and CCM, auxiliary core normally only use CCGR hardware domain
> > control to avoid linux gate off the clk to peripherals and leave CCM
> > ana anatop to Linux.
> >
> > Per NXP hardware design, because CCGR already support gate to
> > peripherals, and clk root gate power leakage is negligible. So when in
> > AMP case, we could not register the clk root gate.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >
> > V2:
> >  Switch to use module parameter, tested on i.MX8MP-EVK
> 
> Why is a module parameter being used? I'd expect this informatioon that
> mcore is booted to come from devicetree/firmware somehow.

In i.MX platform design, mcore could be kicked by U-Boot or Linux remoteproc.
The hardware clk IP has CCM(clock root composite) and CCGR(clock gate).
CCGR support multiple hardware domain control, but CCM not.
Linux handles clock management, mcore only handles CCGR, so that means
Linux CCM operation maybe shutdown and cause CCGR has not clk input.

So when we need mcore run, we should not register CCM clk gate in
the composite. To mcore is booted by U-boot, we previous use information
from hardware, but to mcore is booted by remoteproc, we have no way,
because linux already registered all clocks.

So now we use a module parameter to let user decide.

Hope this is clear.

Thanks,
Peng.

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

  reply	other threads:[~2022-03-18  1:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 12:41 [PATCH V2 1/2] clk: imx: add mcore_booted module paratemter Peng Fan (OSS)
2022-02-28 12:41 ` Peng Fan (OSS)
2022-02-28 12:41 ` [PATCH V2 2/2] clk: imx8m: check mcore_booted before register clk Peng Fan (OSS)
2022-02-28 12:41   ` Peng Fan (OSS)
2022-03-17 19:38   ` Stephen Boyd
2022-03-17 19:38     ` Stephen Boyd
2022-03-18  1:15     ` Peng Fan
2022-03-18  1:15       ` Peng Fan
2022-04-12  8:11   ` Abel Vesa
2022-04-12  8:11     ` Abel Vesa
2022-04-12  8:14     ` Abel Vesa
2022-04-12  8:14       ` Abel Vesa
2022-03-17 19:37 ` [PATCH V2 1/2] clk: imx: add mcore_booted module paratemter Stephen Boyd
2022-03-17 19:37   ` Stephen Boyd
2022-03-18  1:14   ` Peng Fan [this message]
2022-03-18  1:14     ` Peng Fan
2022-04-12  7:58 ` Abel Vesa
2022-04-12  7:58   ` Abel Vesa
2022-04-12 10:48 ` Abel Vesa
2022-04-12 10:48   ` Abel Vesa

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=PA4PR04MB9416A26024C1437162A2C9C688139@PA4PR04MB9416.eurprd04.prod.outlook.com \
    --to=peng.fan@nxp.com \
    --cc=abel.vesa@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peng.fan@oss.nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@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.