From patchwork Mon Jul 9 12:23:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10514495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EF3F360318 for ; Mon, 9 Jul 2018 12:24:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E240A28AE6 for ; Mon, 9 Jul 2018 12:24:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D64C628AFA; Mon, 9 Jul 2018 12:24:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4BD5328ACE for ; Mon, 9 Jul 2018 12:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QMaCghEJDAG5cHX72xR11kMh4bqleaxT9W0fKXn2Xog=; b=eB/gklXEnhDfdd qOl0OzLXAHeRa7slvxcoiKSx36NY5UfMSHRDG7lNXER/gg8Gys8+nZFbiXdCmiD4JLtjz19haEe0r 5Rr6DLm5FrbCEKukGZwDk4ysLNolWMGjlJKZg7im+6VCaNszURN58rDV7e6xKpLJ7nYppG2ADFMTY af0zOBlDcPA11/2HrVVRMFKZJ55unFJ9oT53SVKLxD6dAzwmYCggtnJkIY1GozL0LEb2QwavXvqAf qX1sZzuh8o15FexVfPlG4mAaXmWRwf29MbhpnoRQMgDf6dNQE94FjJC9kHdNoz8E1F4iqfNJshN+s Iq/D6xa0cGOS/KQc0zwA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcVD4-0005he-D2; Mon, 09 Jul 2018 12:24:06 +0000 Received: from mail-eopbgr50067.outbound.protection.outlook.com ([40.107.5.67] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcVCo-0005Kz-AO for linux-arm-kernel@lists.infradead.org; Mon, 09 Jul 2018 12:23:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IPdKiSufcFdD0rzhyOV/i9hvKehkHprWxl7CM90J+0c=; b=uGB7LeaQTLHmWdU7h4RamuWLtwNX+VsjtCBjNqO0JRX1fYT4KCvqmOWlCKjBJKK9ZeWTFA+tRdYuMmxpmI+arKUPFvWl8jzbI6wxXfFpuo+UhQ4tb01ie19v+KL/yXg/zev+Sq9bc4ONqH++rMOJKgMMQH9LnOUUQygJjx+GyDs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; Received: from localhost.localdomain (95.76.156.53) by AM0PR04MB4291.eurprd04.prod.outlook.com (2603:10a6:208:67::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Mon, 9 Jul 2018 12:23:32 +0000 From: Leonard Crestez To: Lucas Stach , Shawn Guo , Fabio Estevam Subject: [PATCH v2 1/2] soc: imx: gpc: Disable 6sl display power gating for ERR006287 Date: Mon, 9 Jul 2018 15:23:01 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [95.76.156.53] X-ClientProxiedBy: LNXP265CA0038.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::26) To AM0PR04MB4291.eurprd04.prod.outlook.com (2603:10a6:208:67::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d0c3ba85-3af4-45ea-ba25-08d5e596c9a5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(48565401081)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4291; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4291; 3:k7lprsa+j7MQkhkVvNmHfTKKhDumX1SFqqdW4AFXuamhe1II68qQ2ur55lyeVWTo8fL1nDhbJjC27XzGCmd43NmES1nGDqaPLArUwtQee7JUtixQKT1761QVJfFDuM9mfKFvtOeTlmFXyG6n4tWO286qcCV4Q8l4frzBFrSNOiJx/VO4zJFWthiwW94LdMwl19rLoqhXfoFafduk0VnkbCaTe8GQHpmZ6/3zsNYkF4lui94vi2B0dMF/IlVVh/HI; 25:jk0HI/jcYIo+UI1+I+NHZwf/iCV/sgEa02MpgQMFZlT3EU8fT7by6ebROnXrYPXGGBL31sjTd6GxPMuImMdWngXJnWMrRbb+H7CuNFstVbKApFexx2ngL2H7szNBCTUVX06lDu+iJJJLDhsazuOF5ESd/EKYw9BPbmfzIdodkemBcq+6YNIY1ImTBneE8Av+CBjvVeIA16AH++dEzUVUGfPp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3lppX+o4oykNamtck2SaBf2MpntBJ33aw7bNyiamlgxYNIMHjoOsFtczjZnzxHfyTIQL7hlMGU76jPElxtL1dFWE3Lq5SdhBA8siuX2ZY/ZHfjOHq6fx1+Ogt48AvP5SbY7CX02k+gWlc5SPo4jLx8VVaXo9wqpRuVcgn9YwxGYny6aGPRN9U5trGz279mZGmoRhY1dTTqqCXjpvgiztVWaNSUJnc3SHT9QBybvFRRc2oqJs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(264314650089876); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM0PR04MB4291; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4291; X-Forefront-PRVS: 07283408BE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6069001)(346002)(39860400002)(136003)(376002)(366004)(396003)(199004)(189003)(47776003)(110136005)(97736004)(6636002)(316002)(106356001)(86362001)(36756003)(105586002)(44832011)(16526019)(118296001)(3846002)(25786009)(54906003)(186003)(8676002)(6116002)(956004)(51416003)(26005)(52116002)(66066001)(486006)(2616005)(305945005)(476003)(81166006)(81156014)(446003)(11346002)(6666003)(50466002)(16586007)(76176011)(2906002)(48376002)(8936002)(53936002)(6306002)(6486002)(50226002)(68736007)(7736002)(5660300001)(478600001)(4326008)(6512007)(966005)(386003)(6506007)(523214003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4291; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR04MB4291; 23:UYbhIMfeZirlRz0y5AAH/5pg9XaTPNTlNiR9+D+9q?= =?us-ascii?Q?z7kvuwnDHR4QD6VTH7vE4oDCymUFzbclMnytxb9MC/AApcW8anf1Pt+hEHyy?= =?us-ascii?Q?tKuLiKSfWwYMzdvMaItvNyL75lXJ4qv7NQ5D3gOCfjv5NmOX4EO02TNJzQEp?= =?us-ascii?Q?bxbpo2xUbvrXp77887XXNIDWtjdUyoLUMuF1cG3g/5lTDlrb+PjzUOsNt2tv?= =?us-ascii?Q?yYejYDzg5Om/Cd2Za37ESP7u52z4sEeSP/tfQqeyxcd2alIRLK3fK0UZBEgb?= =?us-ascii?Q?Cw89UfwSkSO2MdmkmXU+ojRd11WoI/UhExEreAARGuSf1gv2LAVVD/0/+PyK?= =?us-ascii?Q?yS6nEcKpms60nVxs7njab7JNG1LIu1YVFoIA+dmJT/DtJCyUaAFzo/rb/xJY?= =?us-ascii?Q?nNoM7oJiAQ96rPCKe5kLQRcqtdzsf5/G2jt4GmjHXrk245B+x+DrOvLB4ecN?= =?us-ascii?Q?XKKjImfWZF26KpLFK0WA3J2BeHKXFX+EcaVPzTVxK2JRLQ5ZRWKz1tUQd+8A?= =?us-ascii?Q?VPNEJZJ72FIeqeJ7PF3nc5oTu7rL8nKNkzHAHgeDNUnY3fTLzGR73kbdF/74?= =?us-ascii?Q?rumEsRJLRp2w31YxhTUfAkHnwudKeW8sCxGfzWGee++Mpk8JOQA9kupDCYIm?= =?us-ascii?Q?pzIqdSA5z010QSAYcMRgDv6qlzr/CeJf5fQq/9b0pjlqKVY/M2W7oEHqp0gM?= =?us-ascii?Q?/TFg9LG9NcVNTr5dcW+09iSX97MP3qKjows2ObyY4GPqMEesbQp+dg0nbShR?= =?us-ascii?Q?cd7DBnz5uyoM1NndW2Ez5ZB3f8vYf5i8uYaYbgS0VseMnpqtuG5I662sjjiV?= =?us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2wnTkm/ezSAQ4SG1MSCcMwigkAlx2878Lh8bQ10b2PtYhGokmpXhpNlv9b4tjXKhWfZM0dso1JqJehIsDu2cg98Rl27G/F97ZC8LZvirIH+UxPQqfYROgJ6+/kGLZnlK8IHOqovjncbg X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2018 12:23:32.6294 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0c3ba85-3af4-45ea-ba25-08d5e596c9a5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4291 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180709_052350_487822_55C944FC X-CRM114-Status: GOOD ( 14.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dong Aisheng , Anson Huang , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, Robin Gong , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 linux in the same way as imx6qp ERR009619: make the DISP domain return -EBUSY on power_off. Signed-off-by: Leonard Crestez --- 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..6b726dada560 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; + /* Disable DISP power down in normal operation if ERR006287 is present */ + if (of_id_data->err006287_present) + imx_gpc_domains[GPC_PGC_DOMAIN_DISPLAY].flags |= + PGC_DOMAIN_FLAG_NO_PD; + if (!pgc_node) { ret = imx_gpc_old_dt_init(&pdev->dev, regmap, of_id_data->num_domains); if (ret) return ret;