linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: "heiko@sntech.de" <heiko@sntech.de>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"will.deacon@arm.com" <will.deacon@arm.com>,
	"bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"stefan.wahren@i2se.com" <stefan.wahren@i2se.com>,
	"robh@kernel.org" <robh@kernel.org>,
	Abel Vesa <abel.vesa@nxp.com>, Anson Huang <anson.huang@nxp.com>,
	"jagan@amarulasolutions.com" <jagan@amarulasolutions.com>,
	Andy Gross <andy.gross@linaro.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	"marc.w.gonzalez@free.fr" <marc.w.gonzalez@free.fr>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"enric.balletbo@collabora.com" <enric.balletbo@collabora.com>,
	"horms+renesas@verge.net.au" <horms+renesas@verge.net.au>,
	"ezequiel@collabora.com" <ezequiel@collabora.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"olof@lixom.net" <olof@lixom.net>,
	"l.stach@pengutronix.de" <l.stach@pengutronix.de>
Subject: Re: [PATCH 1/2] soc: imx-sc: add i.MX system controller soc driver support
Date: Fri, 10 May 2019 10:42:17 +0800	[thread overview]
Message-ID: <20190510024215.GA15856@dragon> (raw)
In-Reply-To: <VI1PR04MB5533CED52723AE8292CFC305EE220@VI1PR04MB5533.eurprd04.prod.outlook.com>

On Mon, Apr 22, 2019 at 08:48:56AM +0000, Leonard Crestez wrote:
> On 4/22/2019 9:46 AM, Anson Huang wrote:
> >> -----Original Message-----
> >> From: Anson Huang
> >>> From: Shawn Guo [mailto:shawnguo@kernel.org]
> >>> On Sun, Apr 21, 2019 at 03:40:00PM +0800, Shawn Guo wrote:
> >>>> On Thu, Apr 11, 2019 at 06:49:12AM +0000, Anson Huang wrote:
> >>>>> i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller
> >>>>> inside, the system controller is in charge of controlling power,
> >>>>> clock and fuse etc..
> >>>>>
> >>>>> This patch adds i.MX system controller soc driver support, Linux
> >>>>> kernel has to communicate with system controller via MU (message
> >>>>> unit) IPC to get soc revision, uid etc..
> >>>>>
> >>>>> With this patch, soc info can be read from sysfs:
> >>>>>
> >>>>>   drivers/soc/imx/Kconfig      |   7 ++
> >>>>>   drivers/soc/imx/Makefile     |   1 +
> >>>>>   drivers/soc/imx/soc-imx-sc.c | 220
> >>>>> +++++++++++++++++++++++++++++++++++++++++++
> >>>>>   3 files changed, 228 insertions(+)  create mode 100644
> >>>>> drivers/soc/imx/soc-imx-sc.c
> >>>>
> >>>> Rather than creating a new driver, please take a look at Abel's
> >>>> generic
> >>>> i.MX8 SoC driver, and see if it can be extended to cover i.MX8QXP.
> >>
> >> Got it, I didn't notice that this patch bas been accepted, I will redo the patch
> >> based on it, thanks.
> > 
> > I have sent the new patch set to support i.MX8QXP SoC revision based on generic i.MX8
> > SoC driver, however, the Kconfig modification is NOT good, it may break i.MX8MQ if IMX_SCU
> > is NOT enabled, although we can add some warp function for SCU firmware API call to fix it,
> > but after further thought and discussion with Dong Aisheng, I think we may need to roll back to
> > use this patch series to create a new SoC driver dedicated for i.MX8 SoCs
> > with system controller inside, such as i.MX8QXP, i.MX8QM etc., the reason are as below:
> > 
> > For i.MX8MQ/i.MX8MM:
> > 	1. SoC driver does NOT depends on i.MX SCU firmware, so no need to use platform driver
> > 	     probe model, just device_init phase call is good enough;
> > 	2. The SoC driver no need to depends on IMX_SCU, so it can be always built in, no need to
> > 	     check IMX_SCU config;
> > 	3. The fuse check for CPU speed grading, HDCP status, NoC settings etc. could be added to this driver,
> > 	    but they are ONLY for i.MX8MQ/i.MX8MM etc..
> > For i.MX8QXP/i.MX8QM:
> > 	1. SoC driver MUST depends on IMX_SCU;
> > 	2. MUST use platform model to support defer probe;
> > 	3. No fuse check for CPU speed grading.
> > 
> > So, I guess the reused code for i.MX8MQ and i.MX8QXP is ONLY those part of creating SoC id device node (less than
> > 30% I think), all other functions are implemented in total different ways, that is why I created the imx_sc_soc driver
> > in this patch series, so do you think we can add new SoC driver for i.MX8 SoC with SCU inside? Putting 2 different architecture
> > SoCs' driver into 1 file looks like NOT making enough sense.
> 
> +1 for separate SOC driver. The 8mq/8mm and 8qm/8qxp families are very 
> different, they just happen to share the imx8 prefix.
> 
> It makes sense to allow people to compile one without the other and this 
> is easier with distinct SOC drivers.

Leonard, Abel,

Can you guys help review the patch?  Thanks.

Shawn

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

  reply	other threads:[~2019-05-10  2:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11  6:49 [PATCH 1/2] soc: imx-sc: add i.MX system controller soc driver support Anson Huang
2019-04-11  6:49 ` [PATCH 2/2] defconfig: arm64: add i.MX system controller SoC support Anson Huang
2019-04-21  7:40 ` [PATCH 1/2] soc: imx-sc: add i.MX system controller soc driver support Shawn Guo
2019-04-21  7:41   ` Shawn Guo
2019-04-22  0:51     ` Anson Huang
2019-04-22  6:46       ` Anson Huang
2019-04-22  8:48         ` Leonard Crestez
2019-05-10  2:42           ` Shawn Guo [this message]
2019-05-10  7:30             ` Abel Vesa
2019-05-10  9:17 ` Aisheng Dong
2019-05-10 11:15   ` Anson Huang

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=20190510024215.GA15856@dragon \
    --to=shawnguo@kernel.org \
    --cc=abel.vesa@nxp.com \
    --cc=andy.gross@linaro.org \
    --cc=anson.huang@nxp.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=enric.balletbo@collabora.com \
    --cc=ezequiel@collabora.com \
    --cc=festevam@gmail.com \
    --cc=heiko@sntech.de \
    --cc=horms+renesas@verge.net.au \
    --cc=jagan@amarulasolutions.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.w.gonzalez@free.fr \
    --cc=olof@lixom.net \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=stefan.wahren@i2se.com \
    --cc=will.deacon@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).