Re: [PATCH] soc: imx: Get iMX8MQ revision for B0 from ATF

From: Leonard Crestez
Date: Tue May 07 2019 - 06:25:04 EST

On 03.05.2019 16:53, Guido Günther wrote:
> This is similar to what the BSP does and needed to e.g. determine
> necessary quirks for MIPI DSI.
> Signed-off-by: Guido Günther <agx@xxxxxxxxxxx>
> From the list discussion and changelog it's not clear to me why a
> different method was chosen for the B1 silicon so I left that in place
> as is and only trigger on the B0 silicon I have here.

Fetching revision without an ATF call was done for the sake of avoiding
depending on ATF as much as vendor tree does. I'm not sure avoiding ATF
dependencies is a good approach.

The imx8mq reference manual claims that 0x3036006c is should be soc
revision but that incorrectly reports 0x00824010 meaning "A0" on all
chips. So some nasty hacks are done in ATF instead by poking at ROM and

There were multiple discussions also for GPCv2 and 8mm about how much to
rely on firmware. I personally think that duplicating ATF workarounds
just makes supporting imx8m harder in Linux. Don't we want firmware to
help us with silicon erratas?

> +#define IMX8MQ_ATF_GET_SOC_INFO 0xc2000006

Any reason not to use original FSL_SIP_GET_SOC_INFO constant name?

Since ATF can fetch revision for B1 as well it makes no sense to keep
the old code if we switch to using a SIP call, just call ATF always.

ATF upstream currently has 8mq support but no SIP call for GET_SOC_INFO,
that could be added easily.