Re: [PATCH v3 1/2] soc: imx: gpc: Disable 6sl display power gating for ERR006287

From: Lucas Stach
Date: Wed Jul 11 2018 - 08:16:41 EST


Am Mittwoch, den 11.07.2018, 15:11 +0300 schrieb Leonard Crestez:
> The imx6sl chip errata document describes ERR006287 like this:
>
> > Upon resuming from power gating, the modules in the display power domain
>
> (eLCDIF, EPDC, PXP and SPDC) might fail to perform register reads
> correctly.
>
> > When the modules listed above are used, do not use power gating on the
>
> display power domain.
>
> Link: https://www.nxp.com/docs/en/errata/IMX6SLCE.pdf#page=62
>
> Handle this in the safest possible way by keeping the DISP domain
> always-on.
>
> Signed-off-by: Leonard Crestez <leonard.crestez@xxxxxxx>

Reviewed-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>

Can you send a follow on patch to switch the i.MX6QP errata workaround
to use GENPD_FLAG_ALWAYS_ON and remove the -EBUSY stuff in the power
down path?

Regards,
Lucas

> ---
> Âdrivers/soc/imx/gpc.c | 10 ++++++++++
> Â1 file changed, 10 insertions(+)
>
> diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c
> index 526f2d02dc78..f7960f773019 100644
> --- a/drivers/soc/imx/gpc.c
> +++ b/drivers/soc/imx/gpc.c
> @@ -339,30 +339,35 @@ static struct imx_pm_domain imx_gpc_domains[] = {
> Â};
> Â
> Âstruct imx_gpc_dt_data {
> > Â int num_domains;
> > Â bool err009619_present;
> > + bool err006287_present;
> Â};
> Â
> Âstatic const struct imx_gpc_dt_data imx6q_dt_data = {
> > Â .num_domains = 2,
> > Â .err009619_present = false,
> > + .err006287_present = false,
> Â};
> Â
> Âstatic const struct imx_gpc_dt_data imx6qp_dt_data = {
> > Â .num_domains = 2,
> > Â .err009619_present = true,
> > + .err006287_present = false,
> Â};
> Â
> Âstatic const struct imx_gpc_dt_data imx6sl_dt_data = {
> > Â .num_domains = 3,
> > Â .err009619_present = false,
> > + .err006287_present = true,
> Â};
> Â
> Âstatic const struct imx_gpc_dt_data imx6sx_dt_data = {
> > Â .num_domains = 4,
> > Â .err009619_present = false,
> > + .err006287_present = false,
> Â};
> Â
> Âstatic const struct of_device_id imx_gpc_dt_ids[] = {
> > Â { .compatible = "fsl,imx6q-gpc", .data = &imx6q_dt_data },
> > Â { .compatible = "fsl,imx6qp-gpc", .data = &imx6qp_dt_data },
> @@ -467,10 +472,15 @@ static int imx_gpc_probe(struct platform_device *pdev)
> > Â /* Disable PU power down in normal operation if ERR009619 is present */
> > Â if (of_id_data->err009619_present)
> > Â imx_gpc_domains[GPC_PGC_DOMAIN_PU].flags |=
> > Â PGC_DOMAIN_FLAG_NO_PD;
> Â
> > + /* Keep DISP always on if ERR006287 is present */
> > + if (of_id_data->err006287_present)
> > + imx_gpc_domains[GPC_PGC_DOMAIN_DISPLAY].base.flags |=
> > + GENPD_FLAG_ALWAYS_ON;
> +
> > Â if (!pgc_node) {
> > Â ret = imx_gpc_old_dt_init(&pdev->dev, regmap,
> > Â ÂÂof_id_data->num_domains);
> > Â if (ret)
> > Â return ret;