[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB3PR0402MB39164B30B26CAF62EE807168F5220@DB3PR0402MB3916.eurprd04.prod.outlook.com>
Date: Mon, 22 Apr 2019 06:46:10 +0000
From: Anson Huang <anson.huang@....com>
To: Shawn Guo <shawnguo@...nel.org>
CC: "stefan.wahren@...e.com" <stefan.wahren@...e.com>,
"enric.balletbo@...labora.com" <enric.balletbo@...labora.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"heiko@...ech.de" <heiko@...ech.de>,
"marc.w.gonzalez@...e.fr" <marc.w.gonzalez@...e.fr>,
"ezequiel@...labora.com" <ezequiel@...labora.com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
"will.deacon@....com" <will.deacon@....com>,
Abel Vesa <abel.vesa@....com>,
"bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
Andy Gross <andy.gross@...aro.org>,
"jagan@...rulasolutions.com" <jagan@...rulasolutions.com>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
dl-linux-imx <linux-imx@....com>,
"olof@...om.net" <olof@...om.net>,
"horms+renesas@...ge.net.au" <horms+renesas@...ge.net.au>,
"festevam@...il.com" <festevam@...il.com>,
"robh@...nel.org" <robh@...nel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"l.stach@...gutronix.de" <l.stach@...gutronix.de>
Subject: RE: [PATCH 1/2] soc: imx-sc: add i.MX system controller soc driver
support
Hi, Shawn
Best Regards!
Anson Huang
> -----Original Message-----
> From: Anson Huang
> Sent: Monday, April 22, 2019 8:52 AM
> To: Shawn Guo <shawnguo@...nel.org>
> Cc: stefan.wahren@...e.com; enric.balletbo@...labora.com; linux-
> kernel@...r.kernel.org; heiko@...ech.de; marc.w.gonzalez@...e.fr;
> ezequiel@...labora.com; catalin.marinas@....com;
> s.hauer@...gutronix.de; will.deacon@....com; Abel Vesa
> <abel.vesa@....com>; bjorn.andersson@...aro.org; Andy Gross
> <andy.gross@...aro.org>; jagan@...rulasolutions.com;
> kernel@...gutronix.de; dl-linux-imx <linux-imx@....com>; olof@...om.net;
> horms+renesas@...ge.net.au; festevam@...il.com; robh@...nel.org;
> linux-arm-kernel@...ts.infradead.org; l.stach@...gutronix.de
> Subject: RE: [PATCH 1/2] soc: imx-sc: add i.MX system controller soc driver
> support
>
> Hi, Shawn
>
> Best Regards!
> Anson Huang
>
> > -----Original Message-----
> > From: Shawn Guo [mailto:shawnguo@...nel.org]
> > Sent: Sunday, April 21, 2019 3:42 PM
> > To: Anson Huang <anson.huang@....com>
> > Cc: stefan.wahren@...e.com; enric.balletbo@...labora.com; linux-
> > kernel@...r.kernel.org; heiko@...ech.de; marc.w.gonzalez@...e.fr;
> > ezequiel@...labora.com; catalin.marinas@....com;
> > s.hauer@...gutronix.de; will.deacon@....com; Abel Vesa
> > <abel.vesa@....com>; bjorn.andersson@...aro.org; Andy Gross
> > <andy.gross@...aro.org>; jagan@...rulasolutions.com;
> > kernel@...gutronix.de; dl-linux-imx <linux-imx@....com>;
> > olof@...om.net;
> > horms+renesas@...ge.net.au; festevam@...il.com; robh@...nel.org;
> > linux-arm-kernel@...ts.infradead.org; l.stach@...gutronix.de
> > Subject: Re: [PATCH 1/2] soc: imx-sc: add i.MX system controller soc
> > driver support
> >
> > 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:
> > > >
> > > > i.mx8qxp-mek# cat /sys/devices/soc0/family Freescale i.MX
> > > >
> > > > i.mx8qxp-mek# cat /sys/devices/soc0/soc_id i.MX8QXP
> > > >
> > > > i.mx8qxp-mek# cat /sys/devices/soc0/machine Freescale i.MX8QXP
> MEK
> > > >
> > > > i.mx8qxp-mek# cat /sys/devices/soc0/revision
> > > > 1.1
> > > >
> > > > i.mx8qxp-mek# cat /sys/devices/soc0/soc_uid
> > > > 7B64280B57AC1898
> > > >
> > > > Signed-off-by: Anson Huang <Anson.Huang@....com>
> > > > ---
> > > > 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.
> >
> > Forgot to give pointer to Abel's driver.
> >
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.
> > ker
> nel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fshawnguo%2Flinux.git%
> >
> 2Fcommit%2F%3Fh%3Dimx%2Fdrivers%26id%3Da7e26f356ca12906a164d83c
> >
> 9e9f8527ee7da022&data=02%7C01%7Canson.huang%40nxp.com%7C9
> >
> e2705d7449b4c2e23ed08d6c62ce0bb%7C686ea1d3bc2b4c6fa92cd99c5c3016
> >
> 35%7C0%7C0%7C636914293400307709&sdata=6ySEs%2B4SE8bvcBCkfoi
> > VBafseAYthTED9%2F5qcf25xds%3D&reserved=0
> >
>
> 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.
Anson.
>
> Anson.
>
> > Shawn
Powered by blists - more mailing lists