From patchwork Thu May 6 04:15:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 431627 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1070499jao; Wed, 5 May 2021 20:43:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweRpAHC47OcWxunmxz8Z10VHHEO/D3IVL1dBYh4lPcKpemg49UCzcfvBZG1m9jKJD2agpP X-Received: by 2002:a50:9b12:: with SMTP id o18mr2627168edi.376.1620272635027; Wed, 05 May 2021 20:43:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1620272635; cv=pass; d=google.com; s=arc-20160816; b=V/etzj4UB+H2dqmwZoy76GO+Z8ePjgekgob5xXW1EfpqZbF83KCCXxOGpeh9IzAs7G XFbPNOnHk9RaC90LtMyrF8ShwLT+/FC+dsHx6VdQTIvk6m7odltwatWmWhALb2BxcyaI kVLBWWFaMdSTKd2+xoAx2GV9ntRRt9ZDRx7sRRMccQcJzCTp6dgcNqzhEmlM9oKNQXSB /9F62I6dNH6l3yo4xmMDIRMbZ4lAxWUQDZbXfGLXlTJkjZFU6RGBV6XlMtteaO/R+tEK eNiPPWcLhVM9GMry7jvc3A6VZPHL9HQBDp6fqIsBSp/NjduoNB3ZDBSdtGQcND2aEavC SQGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=A+F9ydPzZQL7+HYXXydKkW6iHvplYGD6tVCXh+5X5vM=; b=E6uZo3hThjxnvuDn+jajAqqBC10Mm09GVkvc1tB1Ma9EX1H6K/zV1ptWcInJVKatFA PD9j2/wJ/E/VtZL2B9Ixt0n9Iz8WUgDChfODqQQFZBAZF0JMyrHnQIIGnSCaTeORGJHn FmZbOdpOowwZpU2pOe2yp8zWwQqBQKeNCpusW6ZxWNqSJfDClxab/YqZyuZO9Bsv/QrM qnWMx/hvPAvB3/ca2Ja+ClRz/GjqCMjQ3d7/P6VYa72ulLxCEvALHYO+jnwP/oCKyud7 AdQFaIUi7QKfjpwiwIPv784NBDjREznmlQYvU6W/KvV4pKYNQixqTEX4kOBfFqYoLFFJ C6AA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="X/psBsOc"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si1119706ejx.447.2021.05.05.20.43.54; Wed, 05 May 2021 20:43:55 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="X/psBsOc"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231630AbhEFDos (ORCPT + 6 others); Wed, 5 May 2021 23:44:48 -0400 Received: from mail-eopbgr80079.outbound.protection.outlook.com ([40.107.8.79]:29969 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231336AbhEFDor (ORCPT ); Wed, 5 May 2021 23:44:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mqo7UUEVyVg3FTrL8h9/Lj9ucFEYUFt8LTQAZdlraBNBLSZI+TGaDBgsXsltYoM4y91dbgZHIOPKV8V/JMKhu8itl6mcs4US0KZXIteSlyb+sjks5kqflKpWKF3fab7zSLktVzsLt2NnC08vDloc8v2QJSQordALWOSQwDIhntDvwPRMs+XG3LwIMLlJDR8o/wCy8nxNMEBb6PoC0w76FcDHFtRWPMXO59Dth7TQjxo4iOOXjjAZ02Oq4QfY8h5rgt6jHsY6uqaaV4W/Eq63Lee6StmkRqh29zRi367MJTVJjKJANSlR0b0Yf8t5731w15hqXMs6q/flBhowMPTpjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A+F9ydPzZQL7+HYXXydKkW6iHvplYGD6tVCXh+5X5vM=; b=Rrcx2EdOkj3rh6+UyBqTgcZWIxchaUyYVe363PzrRX1rDWdY2+FTxfzFdFdLn6ykxt7/vP0mxBbmDriq0UxvPIDr10kQrWe/hqTY8o/Z8VHdztox5HRff0i7oGRredpvCBrMHpZ0STqloRwd8HKV+V/v9SXjGADgkrTXwWfnMPVEV0C7rUtOV2trzZRD0SWb4DHvYvFgpJ0XmKiBP3EUK0H8GQeuA1ryeiQMt/oYGsnnEmi7DrK6vA2JMARiMwkLfWr7eXRywy8uE2/+v/8Ax57ZM0RYAelBVJe/SPo8JAD00i62Gw4PMas9pnXEDbw0yhaMlGusGpg7GmNqUO0Qfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A+F9ydPzZQL7+HYXXydKkW6iHvplYGD6tVCXh+5X5vM=; b=X/psBsOcvcH0JqcxxUQAEhQxDXYRUx+VvqfiEv0gzJLfczJhjWw8gKnNfJhezVzN5qkTJgNqP4H2DKd0e9UfoUdYN4Iz0o8hfXi/nq2ch/KTFc6CH9gOPkeVFyTu+LVsMY3k6nXEL7RPuSGzqZ7v8ezbSWTfUgZh0rJPWf+5XbU= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (10.172.251.142) by DBBPR04MB7979.eurprd04.prod.outlook.com (20.182.191.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Thu, 6 May 2021 03:43:47 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64%8]) with mapi id 15.20.4065.039; Thu, 6 May 2021 03:43:47 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, p.zabel@pengutronix.de, l.stach@pengutronix.de, krzk@kernel.org, agx@sigxcpu.org, marex@denx.de, andrew.smirnov@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ping.bai@nxp.com, frieder.schrempf@kontron.de, aford173@gmail.com, abel.vesa@nxp.com, Peng Fan Subject: [PATCH V3 1/4] dt-bindings: power: Add defines for i.MX8MM BLK-CTL power domains Date: Thu, 6 May 2021 12:15:52 +0800 Message-Id: <20210506041555.10719-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210506041555.10719-1-peng.fan@oss.nxp.com> References: <20210506041555.10719-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Thu, 6 May 2021 03:43:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 87abb1ec-8ad2-41b0-5c42-08d910412759 X-MS-TrafficTypeDiagnostic: DBBPR04MB7979: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9/+IIFLwtg7R6YDc4BPfMq+iVP902GcuZ2rmHc2IA5rkIjQUppaGUfzswd2P8GYWvtGOrHFMytrv0zuIeRT0kpli7Vmq56Jhn+DbxNAXTsemdizdyrGtELmlNgTZ/x9Dq5bJ/AsJJx1IC3BZnxIqmMvjNVmwXlX9O7nc2mMP3P75jYOtb3Ae6VOsa7PqEs/oJ8ZfvR+ea+T0mj1Bn9dQmBARogX1W0t5WP5FqIKU0QMsYk6R7I6waKcm8X6e4Wnss+S1a7ck8DamzbQb24QiHNaHjmF89LTXSoS1saJEFuImGZs4TyDomYD5ZEoAfDs2u9tVcyn9jzvNf3k8Nmm1nrEzsRixRwH2CgotX4dC7CbwzPqeE3vrQW4Z9x3aH2BLc+AmbRxNwWH5ZA/I2Xc0ZuIlCybFI8iDh0PnQtgdzNCop6M6BBsD+EONUuqKmxGwIbJ39Wfpuo5SzxmT+wcyPZemJ9/j0l6GSpbae2lIXdlPYQaoQuQwhYwGeQbw5zexRdgz5Kpp8PwrvyCF/kjvBfhAr6ZJ+zFyA4sVBarQVEl1LbMzv0oZeG/oUKa3RWeNZPPzQDIg9R6B7A4+zQucYEa311t6frooo4hj9cD74mXwDvDaJXU75kb4lxqO4lwPlJ4IcSz2mT1i3i01Corwhm1HuTqxVwuf/Y0PrFA41wE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(366004)(376002)(39850400004)(4326008)(2906002)(316002)(8676002)(6512007)(956004)(2616005)(5660300002)(6506007)(6666004)(66946007)(8936002)(66476007)(66556008)(52116002)(7416002)(478600001)(26005)(186003)(4744005)(16526019)(1076003)(6486002)(86362001)(38100700002)(38350700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: W1qZZ3b84FKIr8o/NAqfX1udilz3bGc1jqSsXtig3M7+dST8n7BDJwTj9gOVBVGYuoKU5USRnt5dfZeb3Em8uM5FYKAuIj2ys9+YEjf2bSPqUWLZ2Da3b6khsT1RFa70FScLWNjOn+9F3PzRxvEpPah1C/qqFK6Ex6PlhrqgMtjjoDK0fz330B3Fy8maguRNQZ+EOLoSErb1+Wc0IRHm1VbT4FnOdjUCIkOU2KWiMT3ZvsyYBQp4WkGTvljrveAcmijPTMPv1Bh497og7bjVvtN2nPA72knN6asbFfANkbEG+QPhjuhaP49HgT2mHtr5zkGiaO7uguh84EiUyqWE1UmPNbVPhrWaKf1CdT0seLq7Pui7Eyma+/eSZPghkFzuZ6MPS2juNTfoIw7POW2hHXl/HAmkR5aQyahO145nBJQuWISbQxCLZS0SF4vtqnmfzV2bo56k2udt6+ZEahe3xFUDBrniVD1w9eOvGkKXMQ0k81f1TLj4t4iVPz/DLUUIwvJHE/+0+X7SfOUOpHKt3zRds0Pj0gSx3JMKR9LZc0kPYB+Bd2n5usBEy5fTyfXqtF/ePaQ+0Dnj+8X0ZHMZype4KgVHyKWxxHbghxE1cUG9IzLyX4efZSHmTfhX40LvariT8Hw+vH6x5L6x7pXxGMxOI42lBRtn4VMoKTwFgJ9ykz3K4NwMnDiQ9cb9tsjV4tcPVrAnFrNrK5cJd2ItRltHdpaZ67Gds2RQkbycbVSN2oGt2pWlHCmfBKh6tCXLCkxJ4QGmZiNdWqhn7A9JLCmARkzACVODyClAX/ranUlv5wJBfTJIv5HmIlXLOmhDFeneJYr8fy1XrsQ0fYET67tZ084qaCvz4tKqX/K0hfdZ+aRzVJZ8gO0vGJvgTmgmg7XfFzcFo1FPlwEqiURQwoQlAPNo5qH0WTZNz/KdSG7UuwPpTivoEvvQo/RShoqjmAcKYWoAJkq2vgc8SSZSBGrlLB4gOlyymnewVly6STLpTzQz5iJWz3AYojcPnqG8ktAv2E4bDe981IX/noaDOHwuGZSoXmShC4++0mOazRlk7EJLDVBlbm1z3IW8tCB9R5h7762HbQE9NEK2h2PLomnlHZAto/noSdeVeuzgGdmnc+NZyrJ07Ad48GnlN8KmbTE2d9XmJ0KmTwhMr1YA4EPUgQ5CXpVqz6kTMCy+Aty/xv+thE3iZQxqlzrTIqvWxil+K0lxgAy1hTPfC2ZrHRB6YXDG5jgmW4ackc3M/H9Rj2NK3pzYQHkuRHKqRzEyw75Wwxnu8qmK2etmUNHdqOIPI40sIr6AgBHzO5YA03LvwC0hNym0bXNLEbWcwxTlVvD4d5MzmOqt3gKwzuy4sw== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87abb1ec-8ad2-41b0-5c42-08d910412759 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2021 03:43:47.2430 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XeZR0YNlFCxHf3zmhlHRtlnjxqBPMYcJD+dA7e7yZV5Ma1SEHqfg5YMaV9p2WKRKvNXqEhni82wZgLERvRUw4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7979 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Adding the defines for i.MX8MM BLK-CTL power domains. Signed-off-by: Peng Fan --- include/dt-bindings/power/imx8mm-power.h | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.30.0 diff --git a/include/dt-bindings/power/imx8mm-power.h b/include/dt-bindings/power/imx8mm-power.h index fc9c2e16aadc..510e383d1953 100644 --- a/include/dt-bindings/power/imx8mm-power.h +++ b/include/dt-bindings/power/imx8mm-power.h @@ -19,4 +19,15 @@ #define IMX8MM_POWER_DOMAIN_DISPMIX 10 #define IMX8MM_POWER_DOMAIN_MIPI 11 +#define IMX8MM_BLK_CTL_G2_PD 0 +#define IMX8MM_BLK_CTL_G1_PD 1 +#define IMX8MM_BLK_CTL_H1_PD 2 +#define IMX8MM_BLK_CTL_MAX_PD 3 + +#define IMX8MM_BLK_CTL_DISPMIX_CSI_BRIDGE 0 +#define IMX8MM_BLK_CTL_DISPMIX_LCDIF 1 +#define IMX8MM_BLK_CTL_DISPMIX_MIPI_DSI 2 +#define IMX8MM_BLK_CTL_DISPMIX_MIPI_CSI 3 +#define IMX8MM_BLK_CTL_DISPMIX_MAX_PD 4 + #endif From patchwork Thu May 6 04:15:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 431628 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1070516jao; Wed, 5 May 2021 20:43:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8uzzJDiAvPWeMXcx5X60JHh2plElpYOsmlXXPyFins9aTe7zd2FrWMXQJqOsA+FyV5X5M X-Received: by 2002:a17:906:fb0e:: with SMTP id lz14mr2044326ejb.424.1620272637048; Wed, 05 May 2021 20:43:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1620272637; cv=pass; d=google.com; s=arc-20160816; b=f9e6oB8w8t4HmJL3XFkbgxdoX+nt6kMyeG9PQsufXaT1PKtEocPBCZ4ZvBcQ3tYkge ivsuOqGiE4rKNga7cYVJH6GVoUoBQue2D26aPc6EGPKj1KVCrEp4WwXmqMKFJDvpi5mH uW6Ql5G/+z0sti95jA7EHcpdNJd04Zj2RKOXPZE01RWEKcvtYtlsJ3R8adTM9pu67FMZ L327xmVVyAlDp3COsTVpmnAIxsMWPCnAGiJiSbiX8m8m6YuZ9aAfN10ZaUDwScdKBGDI 6lmC96lbkvluXfeFxFyPkWxz16iIKglbxWleXjgfxWoDkfdT62PW/saQcWWCmBfVly+d O8CA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CoYuZ6fKfcB+WwVVfZF8+Omv1B3nHCEknsEO01revno=; b=VrMfpa0NvfRFCWYSZI+ySCtZ7mc88urWzXdA2SR44MvnrAT1totO+oSsQVXpizd23Q Fp7sq7i+4/LVGXFOahfC6d2WmLlov3RnfibNzcBMPGTav2NfIgYKFuw6swZ0xax5VnYn cIXkuBP8cN7zNro0ix/N5zm3BFTb6INa+SekTfkCnfvzWB3zkLpmSJxW+wKpARnAXsm3 OnSjmcBJRNbBNUCVWqeAeSEPiRNhheCHGlVE/P31y5Gg8Srn81Q6AWrIIxDBTn1ssVEN /gh2T2gHmLG03HplmQPEm33WVgH18DeHp150cGD8IXOf0houYpIJISHxjTbqBBSXxFFB MLNA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=HPk9Fcwc; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si1119706ejx.447.2021.05.05.20.43.56; Wed, 05 May 2021 20:43:57 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=HPk9Fcwc; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbhEFDox (ORCPT + 6 others); Wed, 5 May 2021 23:44:53 -0400 Received: from mail-db8eur05on2082.outbound.protection.outlook.com ([40.107.20.82]:27233 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231800AbhEFDow (ORCPT ); Wed, 5 May 2021 23:44:52 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AF6pyAwLKr62jOdGu/2qMaGqlGt9AgnJkUIJIANX8YfvFN4139hTmj4lBH0lOfKMHBWB5ZV9IxJsAS8RorWCBm4ekdY6LS8Qr2jHj8EDDyA5OEckXgKg2R/eEFikGb8CQtDFADAyj69bHxFBrcf6TG+xyGcVAfxEuXQv5bSKGUo3/yjP360bGhXlu1kUVrg8LOB3uwTsz6o4nxL5hBdXjK8n3qRbJizNq4udSFAvqMILMxe2JFB2Vk83esuSQHYzdBORcoWrhp699iDcSXJnVwuXBU+QfivTVlzoQdCLBLJ0QozNeJd+EJCx1ffU8ZGdySo/1LaSuGvKp4opLwVtEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CoYuZ6fKfcB+WwVVfZF8+Omv1B3nHCEknsEO01revno=; b=EwGKtnazxes8O3p8wUmzDK49Op8HjN3cByyHfKGsBPb+sir3vrZZ10+m/+m+FvTKIiWL6D7zhmuRbS7IDw+rZW0TX6Mc1XNs/089BW1oPag1Dfk1a8i95UvbZXMIGeAhVGjVltxVRr9+LEUxdkh5txkxUUabeqVKkvy4Ui2jCbtQUFRrQxlkdFacd7We8j2UNElJHOehgC0E7jwoXSssoIxy2bNe2QR9gLsHDDIfrgcEhqV3ImJwdiW6koUVb3wqbb8pL0mBmLjkoVHpfKEJIc08SuVkm+kGWk73ngJFTmL1+xr/7hy3z4tcgHff7C4iLVOjL6LZWN6TjR8mkiYFeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CoYuZ6fKfcB+WwVVfZF8+Omv1B3nHCEknsEO01revno=; b=HPk9Fcwcw+LvZPuKBc439FJUQseu7ROAwbma5p06quQWCaE2Q7loW5vgoDH3KcUOpj4YNMn8MfMXzbaM1/AhwM9VBDobyIEVbsd9u5n5kg/cuRZd4hwvyQp25jPwR/atrOY7xdci/UpA7/xNVU6nb7QMJy6gTKljJSeE2U9LBGo= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (10.172.251.142) by DBBPR04MB7979.eurprd04.prod.outlook.com (20.182.191.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Thu, 6 May 2021 03:43:53 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64%8]) with mapi id 15.20.4065.039; Thu, 6 May 2021 03:43:53 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, p.zabel@pengutronix.de, l.stach@pengutronix.de, krzk@kernel.org, agx@sigxcpu.org, marex@denx.de, andrew.smirnov@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ping.bai@nxp.com, frieder.schrempf@kontron.de, aford173@gmail.com, abel.vesa@nxp.com, Peng Fan Subject: [PATCH V3 2/4] Documentation: bindings: clk: Add bindings for i.MX BLK_CTL Date: Thu, 6 May 2021 12:15:53 +0800 Message-Id: <20210506041555.10719-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210506041555.10719-1-peng.fan@oss.nxp.com> References: <20210506041555.10719-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Thu, 6 May 2021 03:43:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 72ad65e9-5a13-4952-25d6-08d910412af7 X-MS-TrafficTypeDiagnostic: DBBPR04MB7979: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zesOgzV4AsmccxE0w497twsMwxROT57kk66KDKpOBUVFbNfcUkaoKvAKEi3nwKdhMDFKOSniaYfaO8yVuF0guRqGemsWlXTITar7OifLgU7hEy/v9QpO0Dzb8HpeTRF3Tbis7vL+o4U4TVQ2Jd3R+wf/S5Qs0VDCd+iv4kmecqzzHbnUgk0Gjx5zcepdSNvt/9ZY3CXGh5+N9TFkkrYpMpEPEH5Rv2u6PF5c9pzD+Pc98GJpOBiqGN9/oaBuOV4rZmljsVmd8H6WXLfswG1NPxzpyd0TjOjC12jWRVsV2q4v6mZ7lRgfQ/NL/RHzQrDGIYLDyLwvYmKjyHAHiUNlgR1Q/vAvwHxRkRjsu+N1M5KOfrTW9yZIpaDA69sPdNBtXEd782zeY1+7K9UXX2jpSyvKTz77M05SCqe0m7LYSjTF8xcGOHhyN84RWDFvUN59oLosMhDxL2CZBJnIyK+JGo9+K+Z7Uxwr+ITGAaKcMcAr2oaDYfto1l+XQFxi220aoVFrlLx4gxWOesw2zhWBqJUx1VHt0YgVZtICa8YyWy2xKnjD4rg982NDmOOBXOInql4C7F5+H2U97HRPMitnPOmnRCnzqN+9g4c8FtOCLBnI9177uyjgFfwAF6vbJGCrBuvCxOTK6C4EQ5Y7r2Xz6xv3BYRrtHcBx7huV4YKnz2Ff/bZ7MmKDMyh7/DRWVZoTp0SNeMZ68Zv56Dttd6/NsmCTWptGwBqIfyKP/U4wvc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(366004)(376002)(39850400004)(4326008)(2906002)(316002)(8676002)(6512007)(956004)(2616005)(5660300002)(6506007)(6666004)(66946007)(8936002)(66476007)(66556008)(83380400001)(52116002)(7416002)(478600001)(26005)(186003)(16526019)(1076003)(6486002)(86362001)(38100700002)(966005)(38350700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 3a2fATAVE2ZeLQv7y7KfLtrFJeSqivVpDQS4bOFw0/fVYv0OWxgHdK9kZR5/jeejbc1BU4AhwH0EfbX17N4AjwFPXm0OEOmiOsqCiu+Nr4aP5/J9WMI6sBcQFsl2L0RWq9TUmjhzEK4y0drLQ1YXcfI1yfHEjwOy7uJ9CWr73/dAgS8I3wZ6ZjopMCAFyeY1wHiBr7Hz0qG2Wz4r2gZPhRDtqj5LYpH5isijEgfp7hKhc7SI9KUyblsozgK9mbr6L9eygM4kZz4fT2SY/C8i/PWP3MmlXyeKKT7G7IWCK9EsRr2s9oTj7mPS5kx0bstU65MHJtEi0GoZGvtDuYjj34/fK8dRQCc1YavR7t5PF79cWX2u9PkX+pSyhtZNItwZt7SsQdwYVKvyuaj2xZct3mVYZCS0UMdiTXjxHFvTLv6eSAExqLzXFlVXJ5wYIBx6q8AvG1sW1EmtLHGDyyFV4HZrddeZHm52+sWhGzn/YUwdv8QMr3ljfLKmXPSa/bezw19urz9fDCXLMI8bwm9Rg+5/JyjXoWtGP/b7bNf0OOIq3b965m/yoOWLZZv0SBQTDNpLMdwUfLrfegbdTjZI1voD1kAZmr494mYUO+SMIDzmdFOtvxS81j5ViprDy0GZYs+8L+EUwGqwx7/eee8uzU0B+qXBXdlRmwxLE0bc2u1wBGbb0RrYlTsSmGUW06Xt+532tvZs8lSF2mhhieS5lnV07PnLM2PG04LZ44EC/p4cl8DepQz1XiHP5WzzkoW3h2AXxA0cD00/huAcK1qFSR4kpzv5Cfkc2GCJHk+UDuWmNtpOWjP3iZJrip1MkUXWdCBDoGo9zmk48a+G5Z/X1BlNTEPxWT++gT31+jxUE2zMvYn4JTW8E44BQF3nUb9E9OMQhtDCE+fAhW+Em6dDLpf2QIxu8eiJpk5MeDuZ2Cb61V1x8aECG9D6UNKtl2fYAzvDSte+kFuhjqa5/hVtpsYebgaq9dXcyrHY/H5uTnY4cfdVLo4ZR1cDmsxLKt7JhCLqtDWtaWOmnvtD8/ySqp9dmDGRo2xS7uredPyBKM7aCjqr4+HGetF0OiPg4oL5R5PKVjAu2N6Ky8QFxm8ym8ZGo4id6MOD1dsOPsYykDvCYGuD5QKkfHGDoI9JCD2NmWvs3GucrsJ898n47aEmG36x6A3Wthfw4ZbSb46CDvpQRLII/8gjLtcPKolKIx/3NR6JswDTROYNvm0gdJ6y8pFcBSq13WNiMPPyxJa33ba7lgZ81DHwQgiulUj856T38mUPRJ+8GNaJzB52oKrl+9TO81/1aX82cYpT0hoockn5q6Mx+ZrJUAkaN0G733Fm X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72ad65e9-5a13-4952-25d6-08d910412af7 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2021 03:43:53.1343 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +ug+fw7R5yMru11XqKA5nvv+MzJTYWWxpv2VK9mk1YrUoQyZLCSbLZsLcvS/VpsyNHRfrrJLFnCarw1d8tEHrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7979 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Document the i.MX BLK_CTL with its devicetree properties. Each BLK CTL have different power domain inputs and they have different names, so we are not able to list all the power domain names for each BLK CTL here. For example: i.MX8MM dispmix BLK CTL, it has power-domains = <&pgc_dispmix>, <&pgc_mipi>; power-domain-names = "dispmix", "mipi"; vpumix BLK CTL, it has power-domains = <&vpumix_pd>, <&vpu_g1_pd>, <&vpu_g2_pd>, <&vpu_h1_pd>; power-domain-names = "vpumix", "g1", "g2", "h1"; Signed-off-by: Peng Fan --- .../bindings/soc/imx/fsl,imx-blk-ctl.yaml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx-blk-ctl.yaml -- 2.30.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx-blk-ctl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx-blk-ctl.yaml new file mode 100644 index 000000000000..a66f11acc6b4 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx-blk-ctl.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/imx/fsl,imx-blk-ctl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX BLK_CTL + +maintainers: + - Peng Fan + +description: + i.MX BLK_CTL is a conglomerate of different GPRs that are + dedicated to a specific subsystem. It usually contains + clocks and resets amongst other things. Here we take the clocks + and resets as virtual PDs, the reason we could not take it as + clock provider is there is A/B lock issue between power domain + and clock. + +properties: + compatible: + items: + - enum: + - fsl,imx8mm-dispmix-blk-ctl + - fsl,imx8mm-vpumix-blk-ctl + - const: syscon + + reg: + maxItems: 1 + + "#power-domain-cells": + const: 1 + + power-domains: + minItems: 1 + maxItems: 32 + + power-domain-names: + minItems: 1 + maxItems: 32 + + clocks: + minItems: 1 + maxItems: 32 + +required: + - compatible + - reg + - power-domains + - power-domain-names + +additionalProperties: false + +examples: + - | + #include + + dispmix_blk_ctl: blk-ctl@32e28000 { + compatible = "fsl,imx8mm-dispmix-blk-ctl", "syscon"; + reg = <0x32e28000 0x100>; + #power-domain-cells = <1>; + power-domains = <&pgc_dispmix>, <&pgc_mipi>; + power-domain-names = "dispmix", "mipi"; + clocks = <&clk IMX8MM_CLK_DISP_ROOT>, <&clk IMX8MM_CLK_DISP_AXI_ROOT>, + <&clk IMX8MM_CLK_DISP_APB_ROOT>; + }; From patchwork Thu May 6 04:15:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 431629 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1070591jao; Wed, 5 May 2021 20:44:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfQt9f6YdhTvDOkkH1SYUxeeD/zZY6PU0XRWdWkaOAHYl9vlr3W8T+cNtwG0znkcdiXQLu X-Received: by 2002:a05:6402:1013:: with SMTP id c19mr2593830edu.213.1620272646319; Wed, 05 May 2021 20:44:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1620272646; cv=pass; d=google.com; s=arc-20160816; b=liYGYnbp9iUjPB42N6CA1PNMg3Cxi8O17fkbmJJclM7FzFmAhKBDg8iXghs0YNVpoP XpWEAcPgPPmpvjg3cWt5ZiicBjtiq7MjidyMcnwsTJXWXfZBx23q40TF+5yrT3IrwKAo nXlpndThYmUtji0B1/npbsMHv9qQCXPas/eofURYPkAY0tJl2thOJGytJJzG9xdmZuvr 6nxiRBsWi1DbwCQTqYxYUSXNOdPXQ29vUk0WUoHymUotWoFPe/pIwy1g4LVsrQIqFgI6 yAK5sUe0VrCPJIyD7HezRKYs3kdCr5fCGUSGRtxP16ciQv4uqMxewwzzo+gmQhUMZXif u0UQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8ZCVMPYE8oIWzbSvqgWJQVakweFQccwNwDNRWjXXZ6M=; b=ab0xnEFfsyMgxC4m4aUuILJgZKeXXKnTfaqJ0+imBH8Bfo3lOSmKQQuHQloqDnAAXV Nse/RG1TBh85XThpl7MAUmjDS4gWVSvVb/wSwFSKEQ7PrV4fIvc7u0IvGEOuG8ZEUH3O ijHloNg2fatI39eAgPMP0Vjl/yF2IkAFua5n/WBzx/w56LclPFPi005farHfxWL7ewPn 2YT/DUB8WbUfuW+kkKvC3lHyZzBGrx5TovWmblhtV1hxHdsXzRycHvEDNar/qHcAjmZM 8yH12xyiUi79ONjjXSwJHUEpR8/juvdXzBE6huNMvCZcGEIi/f+XGqWjxK9HaNtYpn/2 7EqQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=UPsp3i4s; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si1144539ejd.204.2021.05.05.20.44.06; Wed, 05 May 2021 20:44:06 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=UPsp3i4s; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231795AbhEFDo7 (ORCPT + 6 others); Wed, 5 May 2021 23:44:59 -0400 Received: from mail-db8eur05on2051.outbound.protection.outlook.com ([40.107.20.51]:1473 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232084AbhEFDo6 (ORCPT ); Wed, 5 May 2021 23:44:58 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TyKCHYVeKYAaEYDclaG8d+GyI+jUNLf7EzpRplPhIQS4MFppf9qqG9PZzKWmrCeCKUOpQfoBJzVMSElnE4Az0cV45vqXOLpGi5cC+/+f4lYM0UI0q2uFTfkmy8tZK2wcFZQ6cddw8AAxmHzlkv6RqqNNqBhXEc0HWFpCm1j4xlyDdudILIQE+/X5KqogS8vt6yiHwUy8/3H2LjgG+XO6MHbM8s2p9/rtIuFDo/lZdZd8yu6jayqdBhsXjgXegglmOyyItbPya3V7Bu2b/Zowt4EGMZyTDBQyqX65XXYfyCTTQtIBwI/kNKlEnVpz70lOX9J4New5AMf1pxYDmoVNWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8ZCVMPYE8oIWzbSvqgWJQVakweFQccwNwDNRWjXXZ6M=; b=kY8anmHLdNY0k6Ig6Yl6wL5ENGy4kRi6gT+c6oOgWadRS51qk3cu3Ik8sJUwXXm9S9EESaxt4L3OUDdZghKuf2BSYxZzdbhS1QejU3/5QXyNTQc9q+3FVHiUe2cQxdkKLK9BdbF/MQic+qWOC1l5jLR0DM7dunO/rXs2AMfqSkeRNpTI96rb6SZ8pIoQjfLsUW0pliT+Du96lGKXTypu6TBgd0SEbvGNXcfSwJr0P/eUGawSdF/iKSajXYJ+oc2cDwdeNppWpigEikJjVDt0Qcyu6kfJWWKt8w3roSlPRA0ekwYn6X6tKcj9zG1J2LarDiiAcgi/JVCcjAwkDj1wdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8ZCVMPYE8oIWzbSvqgWJQVakweFQccwNwDNRWjXXZ6M=; b=UPsp3i4sDGruASY+8jcjTt0EqaKepKXaCQglVcPiEZ+j3Zvfl8qPItDW0Tq/bDqAhFxGnYRnlxiZg1EqhagNaaHj2gS5XqDv7tx9uQIr8vDE3NgYtxoDrrMDMk37QCxatCz+IP0HsWRxHv680d16xIq3lgq5QQzIO+UdnfrlHhY= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (10.172.251.142) by DBBPR04MB7979.eurprd04.prod.outlook.com (20.182.191.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Thu, 6 May 2021 03:43:59 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64%8]) with mapi id 15.20.4065.039; Thu, 6 May 2021 03:43:59 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, p.zabel@pengutronix.de, l.stach@pengutronix.de, krzk@kernel.org, agx@sigxcpu.org, marex@denx.de, andrew.smirnov@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ping.bai@nxp.com, frieder.schrempf@kontron.de, aford173@gmail.com, abel.vesa@nxp.com, Peng Fan Subject: [PATCH V3 3/4] soc: imx: Add generic blk-ctl driver Date: Thu, 6 May 2021 12:15:54 +0800 Message-Id: <20210506041555.10719-4-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210506041555.10719-1-peng.fan@oss.nxp.com> References: <20210506041555.10719-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Thu, 6 May 2021 03:43:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5e7a18a3-f897-42e1-7b58-08d910412e79 X-MS-TrafficTypeDiagnostic: DBBPR04MB7979: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aI7YN/HPEbg9HY53UR6nfwdZH7njgOvyazN+0jpylwycSE2ySEhDHrIa6k6Y4rvZ0J9hbGjg0YSiFGnNWanDO1d03XGkXvHbXZsTZibIDPPSQ4UTw0SN6XhPzNYuKgJlRKWYIE+7uTD84T9l4PnuP8UZVhdGK6AgMJQZF4X3DjEx6+5sEo/34exxiSzPWoDESkHt9+ek6KJNyT/upQsNThfh8klXvil13aGR3rldDEO5MU6eF0UK+dxes/Dvp89y/3sJ3vCTD/y1qksjFiV5G+U+fIFzDePOsxOTakzLfw6IEZLuvmXn1r08/8CM+A2CzCoBD6Gj34xpVSJm8LJD083XYAo5wknF0suS1SIGn05M2OaNh+3/VuRBmioxLQ33qONrVnk+arMjuQ7ubUYemU3sWv9MRxBy9DY7BGtBeiXT4xZFnm+XFKPyAf1tFIhfEmLLX18vXdyeALFn8z/OIyM1iU0ns4KJVUGjqa9OaKzA/dJcSkvlySCqeD19yfYRi38szmNbwhd9fvkVdbo/T9AadeqKPW3E0xeArDuJY6g4WHacRwOhy+ziOEgEv7VGekouK/3lYrLuiWTC74WMIA24daSaDBxCyyaiw0aHpzNpNJ6Y0o6kiSuJA3HIo3hV4O7H14ZuS3cfABbcf2z5+72ywZO71um5RGttGexEOMAzaAG8Cb++Bz1GTDObHmFD X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(366004)(376002)(39850400004)(4326008)(2906002)(316002)(8676002)(6512007)(956004)(2616005)(5660300002)(6506007)(66946007)(8936002)(66476007)(66556008)(83380400001)(52116002)(7416002)(478600001)(26005)(186003)(30864003)(16526019)(1076003)(6486002)(86362001)(38100700002)(38350700002)(41533002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: EbDfpAegSQz/lHBlmsUKTTKNdqADqzQLrMIGuIX9CQdGF9ZgtUcZEzab9GK27yH0tFx8Z2x9lNaO0povktNNtDg+CfQTapWf5dgsg5rjgEZfrMpzUSAt6a9YxJjfAxb3LdryzSWvoeC/lHzdzF9KFFa8C0Hyr8NvcCY8IJ2+j4OaO4l3yozwOL3tdI+OZKKfN1MIwjZn2GP2XC017Yujj7ffUhl+3lQEUqDzhTDxLc3euF/krfrTD09WyGuMTgsdUFGG/7FgCcjc3vUqpKcHT3UdwbJR1aHYZu1YHWvDmEY7DbqKVxZ6LlWzyKbII1wW0hrQyF3akvY/e8H3loNsaBf4vYb7TejRfeHNnkQmgbANBeZoeyaJBUU7Y3EfP/kg+Vw5c6pnlkLjK+EOWWgMu/TSZM0ZMxVDm29+b3U79ZfjBMgrOr6HuqDp45rldG5XibaJtQ3kYltJuMxMTcjBapwAqNWBkfEn3+XvZJqGlZMECpPS4tRnKLuH8QP/dxXcsx5tJQB/Q6gLZJbrOQiG+aSxVX/ULmRU//8yay8qo6gWsM1bRFAQY5JFIaKQI5bbCD2x0wYzaYhoCCBHuwD2/O30boDGrxrQ9UeGmSua2ZnIgfSoeNQUwVPriX95cLe4upd+Vops46hhLVLVvH8pL/C+QIk5fq3HrjiIwn34ZI0Dy2g6d7zaxJXJ9lX22EmQy5LEOepRfsruuoCq7dd0Ujrwu4DAMMFEc2MImmFJw2OgcmzpklSI4oZdm0T7loil/epydufOhY9epGy3aERyWdxgCmZYHoofFFi6JBFT+5no/h0C2jYJxQ9USX9lrZchk+BYQngIlv8jwivE2TS8NJNptSY5ZEBT65UYZIq7plwlIoshONFaZzFJnIo8Cw7DSuWc3SVSPW64khDbOxYgvxkb+ErkbET2cw4Xc4v8AHhC3oTOogNigFz65Pe/vf6cZ2KQLFSxG5ZK4CcLzJFx5EmbU3CcZKZpsvBF9kDbDL6SCE4SLNCCjP3BpzVgYw17xN1vnEER+UlVnwqUc7eRKpb4X7WxvsnvUXry/mZLH8sQFdk3zLWsA9fy9DZvfpkqwsVomhMNKI88lCp+i6/dX39pCci2rH0dU+nBiQNSMeQbNqqi9IHWmGeo8OmADUx4l2IGn+kTSEGPRYKdywCZwZg8w63yFC3aLjelLVP7x8w3BPuBCt9Mge0HIuSJxjFw0LKIqwGKnHhQZfWnaZPHHPzdZJIhhry0z1UQ0wpqMZPTY2N33UG7GqEvUyuv3tArNZlvHuyvLZrkeTcjBT3vx63khFkfD8SCCLebnMFQoufz31wTDjXPASlFS6koNZ+L X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e7a18a3-f897-42e1-7b58-08d910412e79 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2021 03:43:59.0766 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mXARAUAr+gIYfooQAkLR1Vh/JMJnysYx1lzLXJ5uGxt5OGKjqWsC3Rm69hxziEP9NSdbYMLCAKTV/eVpAFfaBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7979 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan The i.MX8MM introduces an IP named BLK_CTL and usually is comprised of some GPRs. The GPRs has some clock bits and reset bits, but here we take it as virtual PDs, because of the clock and power domain A/B lock issue when taking it as a clock controller. For some bits, it might be good to also make it as a reset controller, but to i.MX8MM, we not add that support for now. Signed-off-by: Peng Fan --- drivers/soc/imx/Makefile | 2 +- drivers/soc/imx/blk-ctl.c | 307 ++++++++++++++++++++++++++++++++++++++ drivers/soc/imx/blk-ctl.h | 77 ++++++++++ 3 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/imx/blk-ctl.c create mode 100644 drivers/soc/imx/blk-ctl.h -- 2.30.0 diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile index 078dc918f4f3..d3d2b49a386c 100644 --- a/drivers/soc/imx/Makefile +++ b/drivers/soc/imx/Makefile @@ -4,4 +4,4 @@ obj-$(CONFIG_ARCH_MXC) += soc-imx.o endif obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o -obj-$(CONFIG_SOC_IMX8M) += soc-imx8m.o +obj-$(CONFIG_SOC_IMX8M) += soc-imx8m.o blk-ctl.o diff --git a/drivers/soc/imx/blk-ctl.c b/drivers/soc/imx/blk-ctl.c new file mode 100644 index 000000000000..e184d862b26b --- /dev/null +++ b/drivers/soc/imx/blk-ctl.c @@ -0,0 +1,307 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2021 NXP. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "blk-ctl.h" + +static inline struct imx_blk_ctl_domain *to_imx_blk_ctl_pd(struct generic_pm_domain *genpd) +{ + return container_of(genpd, struct imx_blk_ctl_domain, pd); +} + +static int imx_blk_ctl_enable_hsk(struct device *dev) +{ + struct imx_blk_ctl *blk_ctl = dev_get_drvdata(dev); + const struct imx_blk_ctl_hw *hw = &blk_ctl->dev_data->hw_hsk; + struct regmap *regmap = blk_ctl->regmap; + int ret; + + if (hw->flags & IMX_BLK_CTL_PD_RESET) { + ret = regmap_update_bits(regmap, hw->rst_offset, hw->rst_mask, hw->rst_mask); + if (ret) + return ret; + } + + ret = regmap_update_bits(regmap, hw->offset, hw->mask, hw->mask); + + /* Wait for handshake */ + udelay(5); + + return ret; +} + +int imx_blk_ctl_power_off(struct generic_pm_domain *domain) +{ + struct imx_blk_ctl_domain *pd = to_imx_blk_ctl_pd(domain); + struct imx_blk_ctl *blk_ctl = pd->blk_ctl; + struct regmap *regmap = blk_ctl->regmap; + const struct imx_blk_ctl_hw *hw = &blk_ctl->dev_data->pds[pd->id]; + int ret; + + mutex_lock(&blk_ctl->lock); + + ret = clk_bulk_prepare_enable(blk_ctl->num_clks, blk_ctl->clks); + if (ret) { + mutex_unlock(&blk_ctl->lock); + return ret; + } + + ret = regmap_clear_bits(regmap, hw->offset, hw->mask); + if (ret) + goto hsk_fail; + + if (hw->flags & IMX_BLK_CTL_PD_RESET) { + ret = regmap_clear_bits(regmap, hw->rst_offset, hw->rst_mask); + if (ret) + goto hsk_fail; + } + + blk_ctl->power_count--; + + if (!blk_ctl->power_count) { + ret = imx_blk_ctl_enable_hsk(blk_ctl->dev); + if (ret) + dev_err(blk_ctl->dev, "Hankshake failed when power off\n"); + } + +hsk_fail: + clk_bulk_disable_unprepare(blk_ctl->num_clks, blk_ctl->clks); + + mutex_unlock(&blk_ctl->lock); + + return ret; +} + +int imx_blk_ctl_power_on(struct generic_pm_domain *domain) +{ + struct imx_blk_ctl_domain *pd = to_imx_blk_ctl_pd(domain); + struct imx_blk_ctl *blk_ctl = pd->blk_ctl; + struct regmap *regmap = blk_ctl->regmap; + const struct imx_blk_ctl_hw *hw = &blk_ctl->dev_data->pds[pd->id]; + int ret; + + mutex_lock(&blk_ctl->lock); + + ret = clk_bulk_prepare_enable(blk_ctl->num_clks, blk_ctl->clks); + if (ret) { + mutex_unlock(&blk_ctl->lock); + return ret; + } + + if (!blk_ctl->power_count) { + ret = imx_blk_ctl_enable_hsk(blk_ctl->dev); + if (ret) { + dev_err(blk_ctl->dev, "Hankshake failed when power on\n"); + goto disable_clk; + } + } + + if (hw->flags & IMX_BLK_CTL_PD_RESET) { + ret = regmap_clear_bits(regmap, hw->rst_offset, hw->rst_mask); + if (ret) + goto disable_clk; + } + + /* Wait for reset propagate */ + udelay(5); + + if (hw->flags & IMX_BLK_CTL_PD_RESET) { + ret = regmap_update_bits(regmap, hw->rst_offset, hw->rst_mask, hw->rst_mask); + if (ret) + goto disable_clk; + } + + ret = regmap_update_bits(regmap, hw->offset, hw->mask, hw->mask); + if (ret) + goto disable_clk; + + blk_ctl->power_count++; + +disable_clk: + clk_bulk_disable_unprepare(blk_ctl->num_clks, blk_ctl->clks); + + mutex_unlock(&blk_ctl->lock); + + return ret; +} + +static int imx_blk_ctl_attach_pd(struct device *dev, struct device **devs, char **pd_names, + u32 num_pds) +{ + int i, ret; + + if (!pd_names) + return -EINVAL; + + if (dev->pm_domain) { + devs[0] = dev; + pm_runtime_enable(dev); + return 0; + } + + for (i = 0; i < num_pds; i++) { + devs[i] = dev_pm_domain_attach_by_name(dev, pd_names[i]); + if (IS_ERR_OR_NULL(devs[i])) { + ret = PTR_ERR(devs[i]) ? : -ENODATA; + goto detach_pm; + } + } + + return 0; + +detach_pm: + for (i--; i >= 0; i--) + dev_pm_domain_detach(devs[i], false); + + return ret; +} + +static int imx_blk_ctl_register_pd(struct device *dev) +{ + struct imx_blk_ctl *blk_ctl = dev_get_drvdata(dev); + const struct imx_blk_ctl_dev_data *dev_data = blk_ctl->dev_data; + int num = dev_data->pds_num; + struct imx_blk_ctl_domain *domain; + int i, ret; + + blk_ctl->onecell_data.num_domains = num; + blk_ctl->onecell_data.domains = devm_kcalloc(dev, num, + sizeof(struct generic_pm_domain *), + GFP_KERNEL); + + if (!blk_ctl->onecell_data.domains) + return -ENOMEM; + + for (i = 0; i < num; i++) { + domain = devm_kzalloc(dev, sizeof(*domain), GFP_KERNEL); + if (!domain) { + ret = -ENOMEM; + goto remove_genpd; + } + domain->pd.name = dev_data->pds[i].name; + domain->pd.power_off = imx_blk_ctl_power_off; + domain->pd.power_on = imx_blk_ctl_power_on; + domain->blk_ctl = blk_ctl; + domain->id = i; + + ret = pm_genpd_init(&domain->pd, NULL, true); + if (ret) + goto remove_genpd; + + blk_ctl->onecell_data.domains[i] = &domain->pd; + } + + return 0; + +remove_genpd: + for (i = i - 1; i >= 0; i--) + pm_genpd_remove(blk_ctl->onecell_data.domains[i]); + + return ret; +} + +static int imx_blk_ctl_hook_pd(struct device *dev) +{ + struct imx_blk_ctl *blk_ctl = dev_get_drvdata(dev); + const struct imx_blk_ctl_dev_data *dev_data = blk_ctl->dev_data; + const struct imx_blk_ctl_hw *pds = dev_data->pds; + int num_active_pd = dev_data->num_active_pd; + int num = dev_data->pds_num; + struct generic_pm_domain *genpd, *child_genpd; + int ret; + int i, j; + + blk_ctl->active_pds = devm_kcalloc(dev, num_active_pd, sizeof(struct device *), GFP_KERNEL); + if (!blk_ctl->active_pds) + return -ENOMEM; + + ret = imx_blk_ctl_attach_pd(dev, blk_ctl->active_pds, dev_data->active_pd_names, + num_active_pd); + if (ret) { + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to attach active pd: %d\n", ret); + return ret; + } + + for (i = 0; i < num; i++) { + for (j = 0; j < num_active_pd; j++) { + genpd = pd_to_genpd(blk_ctl->active_pds[j]->pm_domain); + if (!strcmp(genpd->name, pds[i].parent_name)) + break; + } + + child_genpd = blk_ctl->onecell_data.domains[i]; + if (pm_genpd_add_subdomain(genpd, child_genpd)) + pr_warn("failed to add subdomain: %s\n", child_genpd->name); + } + + return 0; +} + +int imx_blk_ctl_register(struct device *dev) +{ + struct imx_blk_ctl *blk_ctl = dev_get_drvdata(dev); + const struct imx_blk_ctl_dev_data *dev_data = blk_ctl->dev_data; + int num = dev_data->pds_num; + int i, ret; + + if (!blk_ctl) + return -ENODEV; + + ret = imx_blk_ctl_register_pd(dev); + if (ret) + return ret; + + ret = imx_blk_ctl_hook_pd(dev); + if (ret) + goto unregister_pd; + + ret = of_genpd_add_provider_onecell(dev->of_node, &blk_ctl->onecell_data); + if (ret) + goto detach_pd; + + pm_runtime_get_noresume(dev); + pm_runtime_set_active(dev); + pm_runtime_enable(dev); + + pm_runtime_put(dev); + + return 0; + +detach_pd: + for (i = blk_ctl->dev_data->num_active_pd; i >= 0; i--) + dev_pm_domain_detach(blk_ctl->active_pds[i], false); +unregister_pd: + for (i = num - 1; i >= 0; i--) + pm_genpd_remove(blk_ctl->onecell_data.domains[i]); + + if (dev->pm_domain) + pm_runtime_disable(dev); + + return ret; +} +EXPORT_SYMBOL_GPL(imx_blk_ctl_register); + +const struct dev_pm_ops imx_blk_ctl_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) +}; +EXPORT_SYMBOL_GPL(imx_blk_ctl_pm_ops); diff --git a/drivers/soc/imx/blk-ctl.h b/drivers/soc/imx/blk-ctl.h new file mode 100644 index 000000000000..7a950ea9fb85 --- /dev/null +++ b/drivers/soc/imx/blk-ctl.h @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __SOC_IMX_BLK_CTL_H +#define __SOC_IMX_BLK_CTL_H + +enum imx_blk_ctl_pd_type { + BLK_CTL_PD, +}; + +struct imx_blk_ctl_hw { + int type; + char *name; + char *parent_name; + u32 offset; + u32 mask; + u32 flags; + u32 id; + u32 rst_offset; + u32 rst_mask; +}; + +struct imx_blk_ctl_domain { + struct generic_pm_domain pd; + struct imx_blk_ctl *blk_ctl; + u32 id; +}; + +struct imx_blk_ctl_dev_data { + struct regmap_config config; + struct imx_blk_ctl_hw *pds; + struct imx_blk_ctl_hw hw_hsk; + u32 pds_num; + char **active_pd_names; + u32 num_active_pd; +}; + +struct imx_blk_ctl { + struct device *dev; + struct regmap *regmap; + struct device **active_pds; + u32 pds_num; + u32 active_pd_count; + struct genpd_onecell_data onecell_data; + const struct imx_blk_ctl_dev_data *dev_data; + struct clk_bulk_data *clks; + u32 num_clks; + + struct mutex lock; + int power_count; +}; + +#define IMX_BLK_CTL(_type, _name, _parent_name, _id, _offset, _mask, _rst_offset, _rst_mask, \ + _flags) \ + { \ + .type = _type, \ + .name = _name, \ + .parent_name = _parent_name, \ + .id = _id, \ + .offset = _offset, \ + .mask = _mask, \ + .flags = _flags, \ + .rst_offset = _rst_offset, \ + .rst_mask = _rst_mask, \ + } + +#define IMX_BLK_CTL_PD(_name, _parent_name, _id, _offset, _mask, _rst_offset, _rst_mask, _flags) \ + IMX_BLK_CTL(BLK_CTL_PD, _name, _parent_name, _id, _offset, _mask, _rst_offset, \ + _rst_mask, _flags) + +int imx_blk_ctl_register(struct device *dev); + +#define IMX_BLK_CTL_PD_HANDSHAKE BIT(0) +#define IMX_BLK_CTL_PD_RESET BIT(1) +#define IMX_BLK_CTL_PD_BUS BIT(2) + +const extern struct dev_pm_ops imx_blk_ctl_pm_ops; + +#endif From patchwork Thu May 6 04:15:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 431630 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1070613jao; Wed, 5 May 2021 20:44:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrXNz9fcPBgJ3SldR6Yeg9ArURFgK6v6zsGMFuLmb06o1CEdMgt/TcBgKz56BCN5boXlxi X-Received: by 2002:a17:906:f1d4:: with SMTP id gx20mr2099338ejb.108.1620272649507; Wed, 05 May 2021 20:44:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1620272649; cv=pass; d=google.com; s=arc-20160816; b=hRV3b+Veknx3leRnSG+0ChZ5EIZcqJ1gQ51I4rBNthrPZZoNpWaJAgNI/PIMAY4sn9 w9ic/Pc4F4f8mLo7NTCeJmzAFj9TOvltDILqpyEUAoY3pXyVj4eIbFweP8JCL1m8ILNX MdAzqvyZvTv6lAV9bwO2Yemf/lAH6wZAgJ1JIDjdi0uM0wGyoZKQg2ZCmKhWtzSM4og+ l++W6ItL186OPso3rwz6YFmukx5foc6XPOdwjgvp/DXVsnd3Y+wucyInPP/ae1HN0XVC 8+F3TMfJbl/VbID2XAFG2rXQMmdCcf626Aq41kaZXfM43q03ONLDzEKdGn2WoaMANfH7 DSiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dCQ5Sd1nv5vZmeSxuRnTU57SaJ+TwJlP459KmG6vmBI=; b=Wnq5/uPZXVbuDaosSltG7SSz2woNhM1RZJnDJPtBByRlfsJWnMbHp32HOdi5sEXnKL Y2qlxdKTrNPUKUvpyGnDIUnJIfX6T98ILp3eu2kfMq7x9lzswS1JN3Q81crvuIx8RYet vwnpz3Y4zJmhNuhEzIdt4LK6xqQYhKLC2KKAJAib8bnKscayxwzXWjqhzH8xc+qedcX8 ihG+vC8f5E9ZOgxGmJRgCUVQ0Rw/YgHGzSOMQ88HHYveqP8B+ZZ75iHFts5x3bL5olf4 GrKRSI5TZBw9jdg2nCb77m8fU1fSJm4L4bihB1P+bGDdmpNY+vFHM4ZuTp0g73TOzcvI pRQQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=I7kp2AN3; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si1144539ejd.204.2021.05.05.20.44.09; Wed, 05 May 2021 20:44:09 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=I7kp2AN3; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232240AbhEFDpF (ORCPT + 6 others); Wed, 5 May 2021 23:45:05 -0400 Received: from mail-eopbgr80049.outbound.protection.outlook.com ([40.107.8.49]:59780 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232222AbhEFDpF (ORCPT ); Wed, 5 May 2021 23:45:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fpmrmEhme7adTCFuyUS2Kt5CQMkJd0QS7SFnvazzhFJZl3WFfwhFFpEMqh/+VoisCpgg2EsrKT7w5Wc+SU7EC0lhJDbMHR7LEQPp64nj2N2MWaKvGdtaXAPI8xC9fogdiP6ovEkOy4MAtHLtE08X/NdyZJ0kBNTnDO/E9V/3cz6I7DRzee2YAofHUf7Ta1YuEzBhfpmMsfWolzipKerN9iEmhEfw3xRanIM+MsRC4rRumCc4l5pelFoI/mkwGI2DhV727aJeW//ECnt6iLXfQ2h055E7LVMdLZxgFGYolPgidmyZ9qsexQFxCLq7i4uRbmVvi/lYYVstBfe3i/fRng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dCQ5Sd1nv5vZmeSxuRnTU57SaJ+TwJlP459KmG6vmBI=; b=aW66mhqFM8k5dQFDO5KV8KCzTE6N6hSEpQXhv9k/B1LvRAHuGJ7lmIecTlz+ZCLFD5vVtOsCioOU82PVvXgtyrFoUxQIh7gzee4U8m84xX+20M3goKFwVSSLDhHVMVG3sv0rC9G+HsI1oSq7K6ya1z+1RzhdghUc2v5bT1EmtwZA8k/VXAYIwOvhv+ILYOH9usuT/3J6Ni+cDRl547EbInX0ewo9bb/GDfAjbQ1KjJICTQzFIJ7Hnh2ZeM0nu6hDdularL6h2hQwM2+UoAZnGb0aIyq728r6jnizgSVr+QB4962B+hfjX515E1WHQvXipR0YgCYY/4qpoliWmBhdzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dCQ5Sd1nv5vZmeSxuRnTU57SaJ+TwJlP459KmG6vmBI=; b=I7kp2AN30TzD7r9K94Ft520VYecoliCugvJWHCkPM4CSuPB1zTAbB6nL0QDrZNHYwW8gFLyFh5w7GzZ4gfG3cqWEcE/AMUN5fPQ8IGquABINQ3tXboq0D+bNwi8lqY2oRqceP9de8n76lN/o4pFJ4zowxhKEd9vp7rGymbs1A5Y= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (10.172.251.142) by DBBPR04MB7979.eurprd04.prod.outlook.com (20.182.191.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Thu, 6 May 2021 03:44:05 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64%8]) with mapi id 15.20.4065.039; Thu, 6 May 2021 03:44:05 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, p.zabel@pengutronix.de, l.stach@pengutronix.de, krzk@kernel.org, agx@sigxcpu.org, marex@denx.de, andrew.smirnov@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ping.bai@nxp.com, frieder.schrempf@kontron.de, aford173@gmail.com, abel.vesa@nxp.com, Peng Fan Subject: [PATCH V3 4/4] soc: imx: Add blk-ctl driver for i.MX8MM Date: Thu, 6 May 2021 12:15:55 +0800 Message-Id: <20210506041555.10719-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210506041555.10719-1-peng.fan@oss.nxp.com> References: <20210506041555.10719-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Thu, 6 May 2021 03:43:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 975784d1-1188-49d4-79e6-08d9104131ff X-MS-TrafficTypeDiagnostic: DBBPR04MB7979: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:366; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UM7Eo8tcNBRIxDn0EVoAx/9OTc8mcKdgDI8xT9DkkrhAYDl8AuGeipdOnu5Id+dTbFiMLFKpDkKoOZM2SOL51Wk1YHZddAXei4+UYNOEEIf6IgCW8rK9ABI44RxfykHziv2WjdVjqkDAIiDijXV8TV/kO2PbtEYHWy/75wwimlxKiiESPYW4CL+HPD0VVhmqDl85dxHx6yfI1KxBn4s3M2CSb47x0ThO8w/a0tG66m657+iXsg4oWfIrdX6rKsEWl2npK2jM3PeoiG6EdW9ZI3smG9t65opIk5bVTf2EeBM5CSTpYHihWSl2ElDwQP0sMf9rmMtJ9a0svlCq8b1Rw0umeDQZfFC88gFVWa9jideHnWGaeL6bHQuJ6sf758EA3xWstyMMxj9BNYOvHBbsx/Ncet3tjswuqTxrLSQDkyWo+lHDvInJ50H8ZlBfkdK6oaTzdf6Cn9RFBA88pcwNufu71lu98uj+Ws/NAHmMeVdypHblK95uFKEaO1q13mjyPgT24O81SbDGHjjmZOQvVnt2FCiir3SetanAYVgaBDxAojr3xQob+Yvpkm4Xyb2xFZhqeMNQwz319eIggQ9+6z21UrcZhYa7e9WIVti/TQJVMH4z936jytwL5DcZur3KYcz/mbIUo5Qtb+1ulQPFDc/wHqMUrcEEifJU0xSP4uE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(366004)(376002)(39850400004)(4326008)(2906002)(316002)(8676002)(6512007)(956004)(2616005)(5660300002)(6506007)(6666004)(66946007)(8936002)(66476007)(66556008)(83380400001)(52116002)(7416002)(478600001)(26005)(186003)(16526019)(1076003)(6486002)(86362001)(38100700002)(38350700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: O7nEcqDhAT8OvYi+Co1cZwHR1jL5W5k3mJHljLeGUj+b4Tq7gxvLnrrVEpkJcDg+XMvVWuUlqejSoNFVMdQc+cYIgvP2O1Fbw9z27Cw7jCf8UOucilVoWNvsUUPHlut2Bx2v8tytA53ENxwwg/D3vgIOsDL5CILRqri8bKoVg6ETEQkRe4OPODM8utQl737/8ZZRk7IxrX+vJJodr4ux8GoN/L5hXrOuhnLeieE/zLKX5GSZ/o9Wq3IHPKCSspkHtEIDtI6y2ChV0GQVSsXEn7mfx7kV6Hxg+Qy+751gxbyAZqqrSZlCxvihH6Iv28vcdOZTmkkkwA6uXpmGWwzAmAq5igMjfKLOaxIp0PKPUA5cAaegWektCnx5bc9WC2ZWn1SBI/wJv7IoRftytyZ2RboYMYeRz/uLozisfOJ3xbm0JexySBj3CJroBtJNfCwcxCX3PYFcQyHek+/G+UpUCUIzZMZ3RoDFfxG1HoxkAl7HayplQi619ZUaZTO8EERYfQd8pS8SQG0wNc7Kq1vqRvVNuwx05h8j2XPOaWuRm4GpkGLYzGzjPky+vU9od20TPN9mMLwtMsoKrYRJ1Df2xfQXCpYkeNyCuLKfzgKzJQMnXgmdIUxk8lReOkcXxBrxVbOd+ku0YephJrFpDeR4f9HtCOCifduYLTozjHX3rMFl/DQ4KQpptYewyX5Ufa9gLZCtBT73Thv7AXR9xBE8lCpBUK/FEeh8nyFTLjemGcmCivB0r/TG0nbrQCyP9zlzav4ZjTtxV6aR7DsFTnbgGJ/8mqw4k4hfU8FfkHc8CdnP4JVbC9w4x6Cri1saTYOeuXzYrlW40qKDBlCzpvAgwmKa9XhQWBf2amGCflH5+Ql8bhubwAyjgBA0do9s81ennx4mATcek5XA0XTI+pDM0+6xztDUbIyXB9Yt2O8V1sgNeDFrT2L+lRiIWBqHcKwC36Bc/fkYi8wJ/NJ2Ha//g/SDC2TZ8N/zJLcJ8rXs0nZIJvhedntxBu2zgpZyEzmbbIshrM2cSh+2H5OoRvZvmQdILDh5YxkrwMx3sjJOpMxi0KVOMLv+YxDpMQWd6SgE46chHwjbLo0xbU+UEx2GXZMJOj4KmmBRll3MIceg1lM9Df2i1R/1voKXsSVeQQBEDM1Pb1hMeDhUX4QZFNoCUhtGeeYBPwvyDj4L/6bUnVejKysVOnTE6gbslziLMY+2D0pK9rXex/s0Lrsk0e5oi8JghqWgBYUpYrBiyeP175tSSwzfZJnLnXfdos5z9Hl5EEBQXSWIC9qOm+V6ItaNhErMXFddc7db2k1tD6lLVQUwhayF8gdv+UWEAyfRJH0l X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 975784d1-1188-49d4-79e6-08d9104131ff X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2021 03:44:04.9360 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MH7j6Tila/BS5mhup61wh00+K6wiHArAz2HbJ1SixJEwuxlRlEWSQM7UHcFeuwrxPe1lltnZ4rh4NqFkjNgOng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7979 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan The i.MX8MM SoC has dispmix BLK-CTL and vpumix BLK-CTL, so we add that support in this driver. Signed-off-by: Peng Fan --- drivers/soc/imx/Makefile | 2 +- drivers/soc/imx/blk-ctl-imx8mm.c | 138 +++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/imx/blk-ctl-imx8mm.c -- 2.30.0 Reviewed-by: Abel Vesa diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile index d3d2b49a386c..c260b962f495 100644 --- a/drivers/soc/imx/Makefile +++ b/drivers/soc/imx/Makefile @@ -4,4 +4,4 @@ obj-$(CONFIG_ARCH_MXC) += soc-imx.o endif obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o -obj-$(CONFIG_SOC_IMX8M) += soc-imx8m.o blk-ctl.o +obj-$(CONFIG_SOC_IMX8M) += soc-imx8m.o blk-ctl.o blk-ctl-imx8mm.o diff --git a/drivers/soc/imx/blk-ctl-imx8mm.c b/drivers/soc/imx/blk-ctl-imx8mm.c new file mode 100644 index 000000000000..cc6e6705f755 --- /dev/null +++ b/drivers/soc/imx/blk-ctl-imx8mm.c @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2021 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "blk-ctl.h" + +#define MEDIA_BLK_BUS_RSTN_BLK_SYNC_SFT_EN BIT(6) +#define MEDIA_BLK_MIPI_DSI_I_PRESETN_SFT_EN BIT(5) +#define MEDIA_BLK_MIPI_CSI_I_PRESETN_SFT_EN BIT(4) +#define MEDIA_BLK_CAMERA_PIXEL_RESET_N_SFT_EN BIT(3) +#define MEDIA_BLK_CSI_BRIDGE_SFT_EN GENMASK(2, 0) + +#define MEDIA_BLK_BUS_PD_MASK BIT(12) +#define MEDIA_BLK_MIPI_CSI_PD_MASK GENMASK(11, 10) +#define MEDIA_BLK_MIPI_DSI_PD_MASK GENMASK(9, 8) +#define MEDIA_BLK_LCDIF_PD_MASK GENMASK(7, 6) +#define MEDIA_BLK_CSI_BRIDGE_PD_MASK GENMASK(5, 0) + +static struct imx_blk_ctl_hw imx8mm_dispmix_blk_ctl_pds[] = { + IMX_BLK_CTL_PD("CSI_BRIDGE", "dispmix", IMX8MM_BLK_CTL_DISPMIX_CSI_BRIDGE, 0x4, + MEDIA_BLK_CSI_BRIDGE_PD_MASK, 0, MEDIA_BLK_CSI_BRIDGE_SFT_EN, + IMX_BLK_CTL_PD_RESET), + IMX_BLK_CTL_PD("LCDIF", "dispmix", IMX8MM_BLK_CTL_DISPMIX_LCDIF, 0x4, + MEDIA_BLK_LCDIF_PD_MASK, -1, -1, 0), + IMX_BLK_CTL_PD("MIPI_DSI", "mipi", IMX8MM_BLK_CTL_DISPMIX_MIPI_DSI, 0x4, + MEDIA_BLK_MIPI_DSI_PD_MASK, 0, MEDIA_BLK_MIPI_DSI_I_PRESETN_SFT_EN, + IMX_BLK_CTL_PD_RESET), + IMX_BLK_CTL_PD("MIPI_CSI", "mipi", IMX8MM_BLK_CTL_DISPMIX_MIPI_CSI, 0x4, + MEDIA_BLK_MIPI_CSI_PD_MASK, 0, + MEDIA_BLK_MIPI_CSI_I_PRESETN_SFT_EN | MEDIA_BLK_CAMERA_PIXEL_RESET_N_SFT_EN, + IMX_BLK_CTL_PD_RESET) +}; + +static struct imx_blk_ctl_hw imx8mm_vpumix_blk_ctl_pds[] = { + IMX_BLK_CTL_PD("VPU_BLK_CTL_G2", "vpu-g2", IMX8MM_BLK_CTL_G2_PD, 0x4, + BIT(0), 0, BIT(0), IMX_BLK_CTL_PD_RESET), + IMX_BLK_CTL_PD("VPU_BLK_CTL_G1", "vpu-g1", IMX8MM_BLK_CTL_G1_PD, 0x4, + BIT(1), 0, BIT(1), IMX_BLK_CTL_PD_RESET), + IMX_BLK_CTL_PD("VPU_BLK_CTL_H1", "vpu-h1", IMX8MM_BLK_CTL_H1_PD, 0x4, + BIT(2), 0, BIT(2), IMX_BLK_CTL_PD_HANDSHAKE | IMX_BLK_CTL_PD_RESET), +}; + +static const struct regmap_config imx8mm_blk_ctl_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = 0x30, + .fast_io = true, +}; + +static const struct imx_blk_ctl_dev_data imx8mm_vpumix_blk_ctl_dev_data = { + .pds = imx8mm_vpumix_blk_ctl_pds, + .pds_num = ARRAY_SIZE(imx8mm_vpumix_blk_ctl_pds), + .hw_hsk = IMX_BLK_CTL_PD(NULL, NULL, IMX8MM_BLK_CTL_H1_PD, 0x4, BIT(2), 0, BIT(2), + IMX_BLK_CTL_PD_HANDSHAKE), + .config = imx8mm_blk_ctl_regmap_config, + .active_pd_names = (char*[]){"vpumix", "g1", "g2", "h1"}, + .num_active_pd = 4, +}; + +static const struct imx_blk_ctl_dev_data imx8mm_dispmix_blk_ctl_dev_data = { + .pds = imx8mm_dispmix_blk_ctl_pds, + .pds_num = ARRAY_SIZE(imx8mm_dispmix_blk_ctl_pds), + .hw_hsk = IMX_BLK_CTL_PD(NULL, NULL, -1, 0x4, MEDIA_BLK_BUS_PD_MASK, 0, + MEDIA_BLK_BUS_RSTN_BLK_SYNC_SFT_EN, + IMX_BLK_CTL_PD_HANDSHAKE | IMX_BLK_CTL_PD_RESET), + .config = imx8mm_blk_ctl_regmap_config, + .active_pd_names = (char*[]){"dispmix", "mipi"}, + .num_active_pd = 2, +}; + +static int imx8mm_blk_ctl_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + const struct imx_blk_ctl_dev_data *dev_data = of_device_get_match_data(dev); + struct regmap *regmap; + struct imx_blk_ctl *ctl; + void __iomem *base; + + ctl = devm_kzalloc(dev, sizeof(*ctl), GFP_KERNEL); + if (!ctl) + return -ENOMEM; + + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + + regmap = devm_regmap_init_mmio(dev, base, &dev_data->config); + if (IS_ERR(regmap)) + return PTR_ERR(regmap); + + ctl->regmap = regmap; + ctl->dev = dev; + ctl->power_count = 0; + mutex_init(&ctl->lock); + + ctl->num_clks = devm_clk_bulk_get_all(dev, &ctl->clks); + if (ctl->num_clks < 0) + return ctl->num_clks; + + dev_set_drvdata(dev, ctl); + ctl->dev_data = dev_data; + + return imx_blk_ctl_register(dev); +} + +static const struct of_device_id imx_blk_ctl_of_match[] = { + { .compatible = "fsl,imx8mm-vpumix-blk-ctl", .data = &imx8mm_vpumix_blk_ctl_dev_data }, + { .compatible = "fsl,imx8mm-dispmix-blk-ctl", .data = &imx8mm_dispmix_blk_ctl_dev_data }, + { /* Sentinel */ } +}; +MODULE_DEVICE_TABLE(of, imx_blk_ctl_of_match); + +static struct platform_driver imx_blk_ctl_driver = { + .probe = imx8mm_blk_ctl_probe, + .driver = { + .name = "imx8mm-blk-ctl", + .of_match_table = of_match_ptr(imx_blk_ctl_of_match), + .pm = &imx_blk_ctl_pm_ops, + }, +}; +module_platform_driver(imx_blk_ctl_driver);