linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leonard Crestez <leonard.crestez@nxp.com>
To: Lucas Stach <l.stach@pengutronix.de>,
	Abel Vesa <abel.vesa@nxp.com>, Peng Fan <peng.fan@nxp.com>
Cc: Anson Huang <anson.huang@nxp.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Fabio Estevam <fabio.estevam@nxp.com>, Ye Li <ye.li@nxp.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: Re: [RESEND v2] soc: imx: Add generic i.MX8 SoC driver
Date: Thu, 18 Apr 2019 22:01:24 +0000	[thread overview]
Message-ID: <VI1PR04MB5533BF028703707A956DAEA7EE260@VI1PR04MB5533.eurprd04.prod.outlook.com> (raw)
In-Reply-To: 8df8afc4a50512d28247743e06f9ed30534da921.camel@nxp.com

On 3/28/2019 6:43 PM, Leonard Crestez wrote:
> On Fri, 2019-03-22 at 16:49 +0000, Abel Vesa wrote:
>> Add generic i.MX8 SoC driver along with the i.MX8MQ SoC specific code.
>> For now, only i.MX8MQ revision B1 is supported. For any other, i.MX8MQ
>> revision it will print 'unknown'.
> 
>> +#define REV_B1				0x21
>> +
>> +#define IMX8MQ_SW_INFO_B1		0x40
>> +#define IMX8MQ_SW_MAGIC_B1		0xff0055aa
>> +
>> +	np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-ocotp");+
>> +	ocotp_base = of_iomap(np, 0);
>> +
>> +	magic = readl_relaxed(ocotp_base + IMX8MQ_SW_INFO_B1);
>> +	if (magic == IMX8MQ_SW_MAGIC_B1)
>> +		rev = REV_B1;
> 
> This is based on ATF code in vendor tree, but shouldn't we have some
> sort of explanation for this "magic"?
> 
> Looking at the OCOTP driver reg 0x40 is IMX_OCOTP_ADDR_DATA2 and it's
> used as part of fuse writes. According to the driver code 8mq is
> compatible with 7d and this write path is enabled for imx8mq-ocotp.

After further digging in NXP manuals and uboot sources it seems that 
imx8mq ocotp is like imx6 rather than imx7. Posted fix for nvmem driver:

https://patchwork.kernel.org/patch/10908081/

Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>

It might still be nice to find a way to identify imx8mq B0.

  reply	other threads:[~2019-04-18 22:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 16:49 [RESEND v2] soc: imx: Add generic i.MX8 SoC driver Abel Vesa
2019-03-28 16:43 ` Leonard Crestez
2019-04-18 22:01   ` Leonard Crestez [this message]
2019-04-20 13:26 ` Shawn Guo

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=VI1PR04MB5533BF028703707A956DAEA7EE260@VI1PR04MB5533.eurprd04.prod.outlook.com \
    --to=leonard.crestez@nxp.com \
    --cc=abel.vesa@nxp.com \
    --cc=anson.huang@nxp.com \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=ye.li@nxp.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).