From patchwork Thu Apr 29 07:33:28 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: 429213 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1322191jao; Thu, 29 Apr 2021 00:01:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOfFa+wh6U6fpdeKwHz89hGp/tOJ/lhgYnc65SxElAnZ4he2G5PcuZen6wT9Pedpkwt4Pc X-Received: by 2002:a17:902:8b81:b029:eb:5a4:9cae with SMTP id ay1-20020a1709028b81b02900eb05a49caemr34702648plb.13.1619679702125; Thu, 29 Apr 2021 00:01:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1619679702; cv=pass; d=google.com; s=arc-20160816; b=wSHvlj7z+xhjwOvTFRZVbT750jqzWO5sjDmVDy2BmkUCKWVL1BgfgV4ZJLh7PAlHPD OIyICOQsYIxPkEHTOpLz0Dp7fewj2aF4caV8RFE0zyhoraDji2d0J2c6pDQehFKBTCYa B7T6+EMoPXy1wHptgcjQMp9jhoTvwa8gSReMxIPA5Pfm1iDFv4OCoEzeQD3hmnXHzZ2Z AXtTG7NkmHjPPhAPxjhv397qaJtPZJlsCyqOIWlNoEwvtZCKgPE2AhqFkV2j/UW0nx/V FVXisgR7nkSYZejEXdiuUKXd9JbYFm70VncaVD3vYHv5YqJFVUd46I6W8m3ZzuHKPgO4 ypoQ== 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=N9JAmIZMhsrdg6POSJ1GxLavQsnVnR1kiSrDsk2g4aFzlrkeD4k49MMbL58L7gmwah QtGrivZ/zynCDjSKsiADTxIhK2RqwABmIYC+PhCi1btTZ5UvJtoL8++ZJBd+/ue/EnnQ iROmHqCLnx3C2dfsOrz3Z94ahXj2LEYLJRiEahw7TqXsjyy95DbDuH2GjYTwx1+hCeaE DWKZdcSjf6KTrQsSOFDDKhJWiI3IIvHIDiCsnSysoSlFB+60/dSQ16ERvsfpiS4C4wNm mpe4EM0deSNl3qXtOw+JxMLx8+7fWNZNOigzmqbgWab21rEcvPuzbjdcCdwLqxC0aQDj FAyA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=l0KkSon1; 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 d38si2364329pgl.168.2021.04.29.00.01.41; Thu, 29 Apr 2021 00:01:42 -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=l0KkSon1; 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 S239572AbhD2HC1 (ORCPT + 6 others); Thu, 29 Apr 2021 03:02:27 -0400 Received: from mail-eopbgr130059.outbound.protection.outlook.com ([40.107.13.59]:22887 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237128AbhD2HCW (ORCPT ); Thu, 29 Apr 2021 03:02:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gTt+S9AtCMEGKGBtKr6uQ56i22aQMw6+73SSK0DA95IEE12+M0Feg3Ray2NvzNiLa42nwQnFkTYEuyTjxIU7mOetYCuRkmtOg3aYraLliYsjr8VPYxbRRjH9tg75cBPj8KvnqTBaje1009Fdamo8ix9dYeVX4q4tbMtRY+wzwRAYrjQBMgdeU5oj7m91SZ+x9EwHNl2hj/cZZQ9WuwUtaQJ+rqGWyoTuP9PPnKLMXdUuYdrZr4kEUAYDLRoQ7k3AhHyqU3wRouXk/uGTxXqeaQC9/hXCPdxNVvXQ6P+Szq2ssuq5nK8tWMcQwIpFDblEBg/Sr+K5eTo7QdCJPXv7tA== 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=mqz9v3nkVVZwylIt9nwfEQP/baH1epKowLcFFVNtxHLHall4TxHXFKx7NlHIOqqvk+j/yPEdHvws9Pbm7Sa96JfkiyfLWeS8nESlY+FQaNORLqFGZyOho5MPCr5XJJPRmQS+KO6fXiILDFWXd7GsO5KbHCAI5CZBBeA0ODCQRExJ46glrm3s0Nyci0tUjM1HClpw06Tl6lU18MRLedfIIpeJtSXq0MmuSv6FskbnmInn4dDr/e6qA7wkuclmexU/msG0vOdWkVgq6mgPmQDs914O1nMYnCna9lACINfjYQjE2yQmurgxmlFFiB3x2+XGchPAOR/iha+8BKd6oHMzlg== 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=l0KkSon1O8yUFgRzn8M9+qUzDcLVFHqCVdFT1ORQqit12tKTT5q0KcoaQPU3s0MqQQtGNiiEqY91QSOacEWyTt22DtAahUIIi9XU2VV5d63nIpU4P9yXXhYsDUFUs7BZfH22JMQQwyGsyEzTjf6t6LpEFp9Qa1IEyd/pwkwIJMA= 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 (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20; Thu, 29 Apr 2021 07:01:33 +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.023; Thu, 29 Apr 2021 07:01:33 +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 1/4] dt-bindings: power: Add defines for i.MX8MM BLK-CTL power domains Date: Thu, 29 Apr 2021 15:33:28 +0800 Message-Id: <20210429073331.21204-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210429073331.21204-1-peng.fan@oss.nxp.com> References: <20210429073331.21204-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR06CA0016.apcprd06.prod.outlook.com (2603:1096:202:2e::28) 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 HK2PR06CA0016.apcprd06.prod.outlook.com (2603:1096:202:2e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.28 via Frontend Transport; Thu, 29 Apr 2021 07:01:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ae0a02e-669e-4a57-4106-08d90adc9f72 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: 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: VJtkQ5iJYvfn5GS9iBPn1Vmj1PUqqfcmgcYGEwB+jYFwN0Jwj+dJKMadB/+baYzCK3bfSuXkevPogY8/a4rdQSV1PmUZWxtCZBpNPV+XbB7GvB/0tklzcn6N0qJQXNFlCetE3IiUEDTEUl3mlV+oEDs+a0K0OypwAAAi1mDTaK2XhtsUyPzNWGJmv5fcmt5om2b0x2b1VNc1KBnyzb+8GDWUm8xpPBIb3k+O0LJmWkw41Kn0wRnjGld885HBJc+ptwgF6IuZ5Sm9gbrFHhCw7D4kBc14Q1/HRFvRhZrFlvmSQ61XvMuMK045OYW1H/FlhDH3WtwcVnay4A6D62iycTHPPkw6FekijxOrJyoHygyEEcewO7LJsBex4Kd7A8Q1Y4CYQOAU+2CJaMiI01Tli0iP3dYSvPTG5ilCSCdSi7klp2DyD0UEYddiW1TH3Y1k03J+HJAM6tcnagqn16ZuMeRGf1EcFRawalFWj2bYQHvRGZXdZaWwDH7lT21CawrqL5Ycz4db3N2kx/S3+k4s48yzYJMWxJgzG2h86WAPyRvMT1zlGs+dWIR3iWeTB1u5jceiHehIMZdmLCLZMMmN3E5bE/Zu3UQybSM9v7GcGOPiWvzJ9U3xEehsYJ4fVU8SAvuw9n7xGRhnjJq1GPYZDQ== 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)(39860400002)(376002)(2906002)(7416002)(26005)(52116002)(5660300002)(8676002)(66556008)(478600001)(66476007)(16526019)(186003)(316002)(6486002)(38350700002)(6506007)(2616005)(38100700002)(1076003)(86362001)(4326008)(4744005)(956004)(66946007)(6512007)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: s3obxb+pt79m35ZlMCMKVtD0TqJXbF3lGM8DFu1kpoky5V7KbUxF1fKCrShjfaN9MBFYkExnDX294cCC4abmY4G2X2ldvT6s7rO9dVKz4P/WI6CuPaZmMgtDnLx8LGhkwqteeOaVPyl38QAqQTx5YYEB8gb+dNUpLhJoDnUx4lrekWhtq/ASwqQoO88vLJEddOu8oF3HGrFAa59WmG6xrguPuEvWSw7WD5qbC4/bNrwH6fK1n1zyXMNMOPd0SAHXPuNH1BauK+doGYY5zX5mlrj9VTCoYlTPmAkGvPailrSjt/yHGN6xYNFdMsN8GoPmvxSkCHrwdRjDqTmtnH4nFSk5FrGPgxlnhMYOZ86uomObMW9LF+1+US+6sfU31uDWFJ+hKZkYQW2OSVJrFt1HU612/CZzyX8G2yMMCv9sk4XFE0bsYpjWCuavKCWxLhJyzGmzn9P8LKba/RY+XO//uAMMamZc/CibM2wlAg0p4vR0t93uxzs7RTtwhEsnQUDDxvnep8LW7NuzI5fPcpVLSBmKR9Y6s8yqEEHGw9uHuYfs/lFm9P8RWRtrltcHnMUrRC6nxlqgTCWvidTRxwjPu6UdSGreSsOHeXOf/ZnlYX1JoIIm7zE8AVdsDT1O043UD2pVLfVLbsMho+KWq1yWqbBSzHlumkzpDvec1UCfejFozPopdDVYBmARKMJy96bHB7eXyAr1y1Lt4NlxAMlepzMfJhtLoQXG0j+p08vHC7EZ/+8PM5Q9ZjFdHvJTt7vBm5fdnAVPEMFMhTlY2Jcj1EATqC9lJ6M07vDhG7EYHiQj9Xp7hjaIXHW7aBsYk7rS5LWb+9I1hMny+8ZW+UGGHGx+oG0+d4D43/NJXgDiza01p49am/AeG6BQFEuLURhklZjhddm473SFvyUILeN768DGZd2aMU9CxT8lZYqnuuGab5Kl89FXszKBLuGZ7dYuhgeMnxt9/E7ybKiGuob0iJuLGTDwhS07e4io/PrOtI4LMaHnH3vhGS41uurZ4EDpUPKljwAMm5xF3Y1Wur0+ZJ8NB4YhU7RllzHNmdUkfnaOZB0vIGtION8W+xvgK55SMUXPVIM81DVTKgkzCnjuInldF/zd49GLGcuj1bKjzPOIF8IqGo8Qq4SaLInu43pi9ZsioWB4g80UoRy027DYNIS4nUFVr98ezrln9z9+RxPry3HolTy+1nzc0CxqA5nLse5qYis2xmhKFK5g3ANbXihpXDKg2IU2NR92JYXwMqYyWihOhMUZZWCGJzXfLX8C937dbkUt2XFrl0fCwQ1R6Hf9g0DtV0bfgRpyuGrhGdO/vIXN63dfSLJusIp3QpIY X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ae0a02e-669e-4a57-4106-08d90adc9f72 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 07:01:33.8171 (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: IL5hMkzLvZwuep3GeInkJA28ZB3tEzZDwnQVu9Uozp5sYudtoAno3D/WID/YjgYq+njqYJ2XLtuozJJYpyJjVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 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 Apr 29 07:33:29 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: 429214 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1322248jao; Thu, 29 Apr 2021 00:01:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/S7Y21U3mCC/fqbEQ43zp8nq0iKH0FPhIeru8J01/hV7iEcFiCWZ/cH4oPQHsqJxsD/jg X-Received: by 2002:a05:6a00:2c9:b029:276:3803:5239 with SMTP id b9-20020a056a0002c9b029027638035239mr19623704pft.25.1619679706565; Thu, 29 Apr 2021 00:01:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1619679706; cv=pass; d=google.com; s=arc-20160816; b=Oh25BPyLDqkjXWFJhbhF+BaRUr3LBcnaPMzmYX6JVlDpaWjMaODkYjugLRGkEgp56j KyuvFDmELtSkC0/LlxasE1Z4mcefa0eEqM9SZi+WYKniAavXTtMsJqAC55VCuFqs4LEB E7Ib1IrpwPLLG6E756gh0ws2gIaAuQswpw7epIcGNy+lLR2BblpH02ys+AnHhN9hDyR8 Xkvn3nUuVYSIpKa4hKGRobGITxeoiZzA01E5gLkbJafJQlU/jvrejaHLKEbs1zU5T6Jn jaSoh5uCLf2Ae/0IpROWoE6JmakMSpNX65/Sl2C44oXskdLW4LUZzaCSNFpTfUqyNFK5 ex7w== 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=L9dCdVio7Wn3zOEXiXm/kW3gmGUiXo2aSwgj2ZLgpLg=; b=PNbLcup85E4ygLGwowHFcUvhQDLzwU8SvrPEOhBl9E+EjD/JQU9pwCWnu1Q91ApLW0 ZZ2kXbyj2WHgwwMKq9KgDpLdN7CUCevMPay5wwXEJ1Kty6U1Bj3Xwrmkn5z/DDOyVVA8 hutXD3zC+GtW2hUBJYgnWACthyNGmYcsMBNaGYeawjmRj3mntbpYfr8HHwax0sOZwR7B JKFeKkL9Trb9LJjTTDDf88i8F0nWrwjMEPV0cOIB3iEeGNPTqfZ85Xs+Cte6t0js78GJ tL/Md8zHOPPq5i2dMPHiXZOP0UGrRLFBrawI+G0SmziGqWK3yznW1RP5L5+IG7KLOpLa uu0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Ss6H40JL; 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 o3si2676434pfd.42.2021.04.29.00.01.46; Thu, 29 Apr 2021 00:01:46 -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=Ss6H40JL; 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 S237128AbhD2HC2 (ORCPT + 6 others); Thu, 29 Apr 2021 03:02:28 -0400 Received: from mail-eopbgr130059.outbound.protection.outlook.com ([40.107.13.59]:22887 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239564AbhD2HC1 (ORCPT ); Thu, 29 Apr 2021 03:02:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GvdBXaqp9dDv+J3CJzR34GQakeA/WgnUwqv+D8DMEcYnNKk2q+3e3GDCTx1V+RGYffHG3ngxI254QCrOiYP5bR7nSayxNct24uuivWQM4kfdW3Cfn6ntLVBcVSTK5Tulkj/luKjGztw/3R+P4RJByHZWx9/oXLVYxonm2wpYgE+yy9Q7pEVtQzP34yKLQJu/ECZ+9oK9K5BM8oPFaIv4j/krtY6ry+QwwpYcI3DCiIHuFQVpC7eIpRoVz7u86ckhcw+t9qxmfGzmijxkOrbiOMJY7F2bd0kI0IqewDGU6nSvcbgWjCIBH/jOMxg/JM9KSJM5XNBqo6SwMmm9Ftgo2w== 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=L9dCdVio7Wn3zOEXiXm/kW3gmGUiXo2aSwgj2ZLgpLg=; b=P8gNj1BF9v6oRmyokiRDd/9SD3l6Blln+3pIPNbdM3HYlOVj9AirZmZ5rkxymRwNaN1JezxwrcOWl6nCMNQUo5AGiiGdbfQrZ4cCzhwkmMouFv+E+Cq5Zy9p4pqWuyjMrMEh5s5PKYQxFbr5C4qbyqO5r6jrFn+4FSWBJtNU8U5c5bQy0ShBTN1u4K5O6VFnBFC3jU40+z6/woFwFeqoRIHgc0ofX2Za/BXWwG7hyP4b9S4ZYE14bKdenxxVYEj09fJhLT7ed9lW2eA6xnGzDrBQWe8e9cpyzoBD7UsMZJE1sEZPm5+0g56FhiM546T0BdBGDNVZgkOJ0eP7okcb4w== 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=L9dCdVio7Wn3zOEXiXm/kW3gmGUiXo2aSwgj2ZLgpLg=; b=Ss6H40JLFToAnVOvsCvpKXZMW0hpqShuU27uUsoq3AN5RJ0kxZykZK6J1vIwqNz35FpyXtOFwQDCJB4S7tTWVC9AO5n0AGMMaQJ6dVH3QeBWyNC8YZgp5KRLwI6PREhNjzvkFBGRitKbx9NMYKSjcRH3N5BJjm2Me8Lhk/Vx9mk= 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 (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20; Thu, 29 Apr 2021 07:01:39 +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.023; Thu, 29 Apr 2021 07:01:39 +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 2/4] Documentation: bindings: clk: Add bindings for i.MX BLK_CTL Date: Thu, 29 Apr 2021 15:33:29 +0800 Message-Id: <20210429073331.21204-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210429073331.21204-1-peng.fan@oss.nxp.com> References: <20210429073331.21204-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR06CA0016.apcprd06.prod.outlook.com (2603:1096:202:2e::28) 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 HK2PR06CA0016.apcprd06.prod.outlook.com (2603:1096:202:2e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.28 via Frontend Transport; Thu, 29 Apr 2021 07:01:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d5aac3f2-2cf5-4d8a-47d1-08d90adca328 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2887; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PmN0EQNaTKJu7nmLn3qhz6W16y3fhv9N2wri1qYbT8qDK6mVV+lBFPDPz7mPY7thfIbuXDme67CwXov76KDPKZbmrj94EtLxh+JESMNtwp2ziyDk0RQ452kudoG4SWZCPaqxY1fDdpC2E64BvSWevt0P8CjMRCPSOx2UDKkQLR5p9QLLel9hRrMcvD7KrZ6G4VMj1+AyUZwNZbEayDU1bfGdJocsyJeN3QLazOC+5muAN65mLHthD/vC1p+JkJ9ByjchHZCr70hjNGwAHW9YmMmVabcResnKmSaJyF6VwvghhvoNtopqKXa5XK+1h707KATBmZ51he6f4l1ZgzoFCN9q5o6fW7D8b5HXI4JjWe6tPRtXCetZDZAbm+WWwIaeJ3zVDRzUp9WpP+nfjKYMet3bISmb0ehjIRrJx40tLwGn+q/YHkCIFdY8+W4Mmr2Y3mTqHeu1pta0FWu5DX3C+VB1TahXLCCZixoKdfJpvmfBpDb1XoqGJbXLX/APIouFcRlHWnb3GVhWxMyz7vqgI1CdMUozlZ98HPmsH8DvYmgmutyQcIMefka2bC0vOzHWVV8ppTHruREj2nX96mhlBMlkUS7QlGONDC3gRCKHbrlSmxm8Z948IdaEc+gMhDzEfZ6HooCBwQx12EejRpY0kmGsQjdSH3Ut3b/jr0kEPcEjCgbYmYF5GRWVYbqL1KYbHBiiOIiulTBYevWRD4sN4uMQggAHwHpQc+QRiZdl3Mw= 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)(39860400002)(376002)(6666004)(2906002)(7416002)(26005)(52116002)(5660300002)(8676002)(66556008)(966005)(478600001)(66476007)(16526019)(186003)(316002)(6486002)(38350700002)(6506007)(2616005)(38100700002)(1076003)(83380400001)(86362001)(4326008)(956004)(66946007)(6512007)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: kJLzpNFzuh9bPppR0fgf89RD4bxqxMzOTqGQu3DYFfe72ib8GA8HLFyJz4atTbVKXDhJlwOWQu/mY2WA8Hpyc/2skWW2/Cv1/Wrqwho2JoNxPTiBBMuJrLkAhTjoT/Zm1/C4aG8koyBlgrYq8fBhpiWdx4RQXKBTo38BicF8AzJUf6RWUNl97W5fl5ac5JWU9G1C+TGp4gYZcjY5lOEV4lSnVP9AlQ+BAVy32RbGRmhR9Z0NhQSHCungSHxgolXrVCDpwIRA66BTOMX7VGjAATNIe/V/yO1fcwh7XyZKZG9dcMqHBWPi6HWOYdHOOCzhsFP06iYgn22vXPMHt7Y+wy60RWT9x0PLyQIW9IeMA0dDyw8gX/affva7AH1wj3RUnb/EYSmeAYKtYoIFFfTYPNwEbZ/BTWDYm9RP1kFmnbP67vVAXyu1FAWFPrOggRyfov2+Ub+cQC8XWvXXorQktEdTM3IDNfbnSTXKzv90lgGZzc/HM8iLIC6azaSzJ4owqg3zzGxQovr3OZbA9j00nXDpZdQjS9FUgZRqSncv2/yFkrr9OdpnLPqxCtKQkT8pZZSmSCWhVba8tSfuAc4aq/Ss2zAPNv4/u5YkkU8047PonAxFx20oPvI65NPGIJQGrdE+WRh7ZUOLvwrEbXFki++4h4wuNMNQEfaAeFJAkzStb80ILbO8WftkwXaBR457gmBXsUMyPca7l3GDIzw5/MG1v+0OnfhZ+IKhCLm1sFhNqE+APw458LIQ2zXjNXi2FN15HaYaXXwLHzv9SWCGpm7U8a0Yh8u337BDz1EqTL+RaCeaOvYUf3LEzFaVTwi+iz4RnTtLeGNwxyUIoJbH3boqgn2P4HMu+ZlseL5FKUcetrH+H817SgrvzAks5PJOsPjLQ1f27CiHHb65q4MZ+IeOJohVou1RICK1XZH6oNywWrmAoAC9TVbJxkbKxXwRzTvTHq0uc3dHoFGWKW3lsa2obfkwzOgdOs5zyDReqP/92ItISMLcawUWXUa7hpX4/IwP6VWTVnPaIMWVoD1Ir37O0N8fW/Kz4Yxn5wkBjrJmaA6tKL5f7/WonjAmWNOZaSPzfgyAQDPOVU5I6V1rdQHssS5yaYsNC/aJaT8rvqkiSc8fHUslUbmfLQQQIb0W2l6r1vGtod4pdEZ5fMDaJrRT3zA52NIBTrxrS1SyHvgDSNaNNROFEl7FcSjFVU1AUiSbIft4kaORU0dvyWvpib6EULjsHtxQFitXTAMV/VIuEdYoCKEjVVB5G7baiF3+dYMTJJgqkT4WqihT31rcdaWzifxX5yJ8ZmHBxGcVQe2pd73x6u6apwLL7rkEVs5D X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5aac3f2-2cf5-4d8a-47d1-08d90adca328 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 07:01:39.8003 (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: apLQ0l/i/jLKJKCx62fCFg7OlvSL4ShNAVd2VexfadjvMTumR5RP+WlUcWsQh3TmRI2minOpYQwJfezCSh1qCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Document the i.MX BLK_CTL with its devicetree properties. Signed-off-by: Peng Fan --- .../bindings/soc/imx/fsl,imx-blk-ctl.yaml | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx-blk-ctl.yaml -- 2.30.0 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..8160ce51a8fa --- /dev/null +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx-blk-ctl.yaml @@ -0,0 +1,73 @@ +# 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-vpumix-blk-ctl + - fsl,imx8mp-dispmix-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 + + '#reset-cells': + const: 1 + + clocks: + minItems: 1 + maxItems: 32 + + clock-names: + minItems: 1 + maxItems: 32 + +required: + - compatible + - reg + - power-domains + +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>; + clock-names = "disp", "axi", "apb"; + }; From patchwork Thu Apr 29 07:33:30 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: 429215 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1322284jao; Thu, 29 Apr 2021 00:01:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw59A2ABT/1WsmWYAXzEKnTobj6xfgY5zSo6jI6dFa+EQGjTxsVkS4l9lG0eTMQhOK5DQ4O X-Received: by 2002:a17:90a:8c86:: with SMTP id b6mr8068510pjo.73.1619679710281; Thu, 29 Apr 2021 00:01:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1619679710; cv=pass; d=google.com; s=arc-20160816; b=l3A5m7QKAETifx9dR8DipaSZIJscRw0ZcdBK7lLCG1myEPAsb7macO1kNI7Zh1RPdv WDCjfRlU0pD5oBLzyg5mbcmBIsBjBZcJ7NnU4jGAeYQ65sVytnywUbEVNPZmT/Fr/1+U RrUoTFtJIm+SMICE+gaCwLg2oZNdahCkU/MH+jH+4F5e83XBn6aTY59z0tvEkvQa/l+U IRxYRC/LdizPhqmS58/SbjECD8IqReIhBQLWfSMJwy+XfCvgaeRcnYX+HOfGo9ah4nRB vyz7rcXT1lHxHTE1igQJmjQiDoDl/lTr3OkqxKiMYzuMG8Dti/kNfRxmAk2MMYS+Bgcz PaPA== 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=+BWnfzYybWl/scTuY5FD9VOLt2LECai+WE378UnVPK0=; b=adN3IZqrKeXgO8M9I0Prx8YPPWgAt4BZ+Gu8CtzmKbFyY1UrbiGMMXs2G2iBEonHMK N4NFi/i9vic5EW3ntujNzse3TtCINkJXVVCeRvQJvgpVsJio8RVZ6RyV0HY/IjmeXzxE 7+kQy1ZoeIjZ+QOizV5oOaWAYE4CoCRpIMEBy9TriT/HwysFmt+Ow68njkyEnFTevREW uqFdbxgkxzC32ilyyBrrznQ6ZtLaiOPrw/StPM6jN6YXC8lqWkCbpB5gR68tJvOsX9EQ v4eO0px/wmBKbhyQmULZSw4YNd+OIVI7ZqhF7pt2JAfDxF3qDY/swfRuNg1LbHV9rKfZ u7Sg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=QX7jJhP+; 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 o3si2676434pfd.42.2021.04.29.00.01.49; Thu, 29 Apr 2021 00:01:50 -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=QX7jJhP+; 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 S238802AbhD2HCf (ORCPT + 6 others); Thu, 29 Apr 2021 03:02:35 -0400 Received: from mail-eopbgr130073.outbound.protection.outlook.com ([40.107.13.73]:54082 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239563AbhD2HCe (ORCPT ); Thu, 29 Apr 2021 03:02:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kgRke9f3gCeslv6Ze2ss2DJAVkXco08/k9ftlRDleCIt9+TNT7o8deP5tbQ/42c73d0ofnMruLFpDNw3kjQKxRMYbrhd8LQ8MU4GGYNHccPmvm+jCEjETeD5f7nrIeR8rHtnl11LW2lSyn4jcQbv3EZxzNkZIdEPEtgiBwZuWWlTMzOmqHHJ+Ogy9LIReKQ4CBWp3Nx8yknP+HEvnJj+HigFwb8WccrHC/OecLep67mjBcNbfK6BqBQE7pOo0Y/jQthwUgtDQpkGVqzrEdrzHajzUkH9GrQvj8NQW7EMtwiFqDphpGI1zN6sHChANrsUBjShWhI8Y1J+LS43yixwDg== 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=+BWnfzYybWl/scTuY5FD9VOLt2LECai+WE378UnVPK0=; b=cvmUU2S8PBOJAiDUWrRM0N3A3VXLLNj1CSgNp7uV3OYoSI9LQfNMHtNyWYt8BHAFgBkBkyrm6Wd+9whx8cIyqcSegSPfPEOUL/ZXzFor1qD6HvnXOz7Y6jO8VsbZKsGuT8n0nFazg0o50PItKEBKuoeZFBMapOph6JTvUsSSxbIw4VOW/uZrrx3VJUhyTi0RfM7tvSJ+FUoSxdduDnmFdgi26r/BbA90KqLkNhYcelQEzB+OqjTVFNWe2wWSS28pDiZO88MP1le1tVD9lr+C5EQIms+y0+XL2kgrKqRxo/9TVvnte8L3sIQcfJ8bHD9LDXMRrHtEVF+vpVD46ZziWg== 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=+BWnfzYybWl/scTuY5FD9VOLt2LECai+WE378UnVPK0=; b=QX7jJhP+AKsV1HWV0ZeTpuxBXpuSOiXhSAec3Kd9eAzvbw9jjan+T/1X8GImvgPejA2rD0kMUeflQ1jOMf4+O70IgGKUEkvxxI2z2xQzFDpIU3lxrOaw5F++iC1tt/qUO2XaSYvTEVG6xncNd2MDzCComiMS0MKyCmQcArTS88A= 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 (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20; Thu, 29 Apr 2021 07:01:46 +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.023; Thu, 29 Apr 2021 07:01:46 +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 3/4] soc: imx: Add generic blk-ctl driver Date: Thu, 29 Apr 2021 15:33:30 +0800 Message-Id: <20210429073331.21204-4-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210429073331.21204-1-peng.fan@oss.nxp.com> References: <20210429073331.21204-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR06CA0016.apcprd06.prod.outlook.com (2603:1096:202:2e::28) 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 HK2PR06CA0016.apcprd06.prod.outlook.com (2603:1096:202:2e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.28 via Frontend Transport; Thu, 29 Apr 2021 07:01:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e8b4f3a3-39ff-4b6a-6189-08d90adca6bb X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: 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: 1JYeDeugnG1J6HwsLY5r8aeqK9heLohq2Rv/l+qmEF0pIhViQfcvvayBiGwllt5P3HhEylknC24cVZbVUwbFLlLiwLmiJDVIF3fyowW+jJTe1haVj9uXTVbuEzp58B/6o6RfganY9d437bgyXsA6t93BWlhTWDakvrsloiBf00w9MjbFqb+7IqVb2kpfQsr5q54UIUObWJM3SjQg/NbKXzvL/WjaPiFPAZgKBq0hw+4PqYa3kMbWGqXgS8tTPos6/Yk5XwvT6lZtn6yz/NYqrJrpHqP9BJZJ3dBvrpRZcm09qqKt/P1VDajOJmbGcJbf2R69VJ5wmUjbOHGZqr7+1boZO3Z2v3ZVVQtVQxAB42EUrTkD3h9IRRE44dSQkhMomWuDVxmItoN19Tiq45pZN9dVDbObK9FoOqs6OwW6e/fp24GZXnJ4jfxTwWpC/Msz3KcMKgoZWCNYvGUzT0alXjr66ceKg9czDj//hnwJg4u690IlaVB6Y6brlXuoKxaCXp62KYOtI6XImMghigwPzYP20wx2eHef3F6iX0h81bSZZm+KPzOk+1XtPudzxc7eUb4Jp2aq+W2cMwPk2PO5Y0YuZwb8hjniNNSCKC2OzusWmgsYfGHhM+JJ1mMCY3w0Y9pdQBxHVL41Ia8V9gsqngLyrUYGwRclvtCbQnOnqig= 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)(39860400002)(376002)(6666004)(2906002)(7416002)(26005)(52116002)(5660300002)(8676002)(66556008)(478600001)(66476007)(16526019)(186003)(316002)(6486002)(38350700002)(6506007)(2616005)(38100700002)(1076003)(83380400001)(86362001)(4326008)(956004)(66946007)(6512007)(30864003)(8936002)(41533002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: yGSmQt3rcTfHmLAkE3FRWRtvcUJt4ydsdmzH/J4UtouicG8mq590d6fnzteJRjAUyl56KEfVk3+WOwOe5w6uMlosOs89NmCClAbdwNoNPaJg+kjZVff8D5li2NNzvTcrEUbSFr/Vr+LmbYb8XPN39nmCFd58vscvkuAYc1iXy7SzqFYt9CmcWz3Pg7YK9I93MXQ6CzRXFeVForlz/vAQBFV0SNa4kwpXMs1CSdCOxpDmSbvyQhSDWJW5uRB0vRtutcRaZZlYhhgV3b5NdKdHBgiswfspMjXxtM1luB6pcTjxmsqdX1PuoG2O9RxPIoT2xmFvVYYls04V5jMjdHWMXEKYpxPx3T0bj+yrjlXJTf/y+/VYbyaq0lDSZiBR8uNXrLjsbui/3QJlcdWP5xWssHu1/XwaLDRBdrT4mT0ZZEq1mCn3vEgO/cC+tx7DlHUMEr0Daqho9xSxZOkd2+/2bE4893U1cceqwUzxqEStfjlApS9go6k4tYSz64b+MZXIvHhXQ02aErHJkYQH3oNCh5cPZmC1a2abcl/uN7kzi1G8zqRLmuSQvhn0VltBaYm3BuoNeYXsaIedgM1Q0I5e70wRgrdlFkl20NVX6KBv7LcKrraewEFdfDygDDX4+p6NNlIojJln43i4NBUjhT+OXWPHrr/t8r+MNob1RHIMQaNdyZ2QL8a3GNiVPujzOgAIfZvxhSbKJCrpWhq2L1A711gwxtyTkZNfa7z9z6LFOA1zDWlf/NjnGo7nrfTfC6NSffSHQwo9VBQUSepcJA2tQiRzA0tbTiAZN2a0/FB21vqVo2+dqPSZKO4wmidVK6Dwx/JhlyumHRvbJDFJnclpYsKlosN6J17fR1y9dE6jO+HxIxW+SwXU0ZSQddsUkv22vLMO3t4Nc6kmJaUvbs/en89GNi3t8nPScqX08DIFQ/xPXaSEBWDR/gg9e3Wo4o/Q1oDsOg2CnW+uPXrpIAdkAv+Cr27uhWWvepk81UIuQ0nReqIfmM6iloycHQqMa4f5MboX1Giodx7nSb3FZmmDocsaZ70NtCoKX9xuVR8YX7UEdp8ad+VarPWXIn9Z7pXy+ubLrcm/D/rW61h5XDxVUdiIA9+lrlZ5sZAV4n062n98nckjqLcxa8fu0adLbsGkN68UU/OjrzHD55offePWiXunfY2OVMnf4ZJZSuvCEM3ptqhkWvtRBLRgmAeKwnSAHTKAB+y7sCx978nPbfqaBhpwHoF5TZlcpsAnSD7Lqenf76OWWzJoHc0zbpdpsqN1WDJNSNr0KKdjZzgyXttM/gUwQK5afbHyX+m0X59ZtJgiad00t/01bpqyfX7O1CW/ X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8b4f3a3-39ff-4b6a-6189-08d90adca6bb X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 07:01:45.8595 (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: sfd2/cS/MxOhG3KRxeFXTFyW2kNdXikLzdbQ3ozrA3SmsA6DGbJTrRms+z02YytqXU1YuSHHFkT0JJaUw1d9Ug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 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 | 303 ++++++++++++++++++++++++++++++++++++++ drivers/soc/imx/blk-ctl.h | 76 ++++++++++ 3 files changed, 380 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..1f764dfd308d --- /dev/null +++ b/drivers/soc/imx/blk-ctl.c @@ -0,0 +1,303 @@ +// 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 "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); + + 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; + struct imx_blk_ctl *blk_ctl; + const struct imx_blk_ctl_hw *hw; + struct regmap *regmap; + int ret; + + pd = to_imx_blk_ctl_pd(domain); + blk_ctl = pd->blk_ctl; + regmap = blk_ctl->regmap; + hw = &blk_ctl->dev_data->pds[pd->id]; + + ret = clk_bulk_prepare_enable(blk_ctl->num_clks, blk_ctl->clks); + if (ret) + return ret; + + ret = regmap_update_bits(regmap, hw->offset, hw->mask, 0); + if (ret) + goto hsk_fail; + + if (hw->flags & IMX_BLK_CTL_PD_RESET) + ret = regmap_update_bits(regmap, hw->rst_offset, hw->rst_mask, 0); + + if (atomic_dec_and_test(&blk_ctl->power_count)) { + ret = imx_blk_ctl_enable_hsk(blk_ctl->dev); + if (ret) { + dev_err(blk_ctl->dev, "Hankshake fail\n"); + goto hsk_fail; + } + } + +hsk_fail: + clk_bulk_disable_unprepare(blk_ctl->num_clks, blk_ctl->clks); + + return ret; +} + +int imx_blk_ctl_power_on(struct generic_pm_domain *domain) +{ + struct imx_blk_ctl_domain *pd; + struct regmap *regmap; + const struct imx_blk_ctl_hw *hw; + int ret; + struct imx_blk_ctl *blk_ctl; + + pd = to_imx_blk_ctl_pd(domain); + blk_ctl = pd->blk_ctl; + regmap = blk_ctl->regmap; + hw = &blk_ctl->dev_data->pds[pd->id]; + + ret = clk_bulk_prepare_enable(blk_ctl->num_clks, blk_ctl->clks); + if (ret) + return ret; + + if ((atomic_read(&blk_ctl->power_count) == 0)) { + ret = imx_blk_ctl_enable_hsk(blk_ctl->dev); + if (ret) { + dev_err(blk_ctl->dev, "Hankshake fail\n"); + goto disable_clk; + } + } + + if (hw->flags & IMX_BLK_CTL_PD_RESET) + ret = regmap_update_bits(regmap, hw->rst_offset, hw->rst_mask, 0); + + /* 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); + + ret = regmap_update_bits(regmap, hw->offset, hw->mask, hw->mask); + if (ret) + goto disable_clk; + + atomic_inc(&blk_ctl->power_count); + +disable_clk: + clk_bulk_disable_unprepare(blk_ctl->num_clks, blk_ctl->clks); + + 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 0; + + 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) + return ret; + + 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) + return ret; + 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:\n"); + } + + 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]); + + return ret; +} +EXPORT_SYMBOL_GPL(imx_blk_ctl_register); + +static int __maybe_unused imx_blk_ctl_runtime_suspend(struct device *dev) +{ + return 0; +} + +static int __maybe_unused imx_blk_ctl_runtime_resume(struct device *dev) +{ + return 0; +} + +const struct dev_pm_ops imx_blk_ctl_pm_ops = { + SET_RUNTIME_PM_OPS(imx_blk_ctl_runtime_suspend, + imx_blk_ctl_runtime_resume, NULL) + 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..e736369406a1 --- /dev/null +++ b/drivers/soc/imx/blk-ctl.h @@ -0,0 +1,76 @@ +/* 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; + + atomic_t 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 Apr 29 07:33:31 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: 429216 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1322372jao; Thu, 29 Apr 2021 00:01:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiwzNrQCwbIKgfuUo76wsgmzh5qTTdV0PMHOSXMoBwf7hxAtGoA9oG0US4B2vgQRD6Kuyt X-Received: by 2002:a63:d70f:: with SMTP id d15mr31400535pgg.397.1619679718800; Thu, 29 Apr 2021 00:01:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1619679718; cv=pass; d=google.com; s=arc-20160816; b=lqN7gAY8rvh5Tx1hf0viscxXHuO6rmn/bQpbjE1HlDAxpKjxnW7sC5GDD52a6Jg5k4 ZBYqj5/m6lquSN2le1gEBndNph/Basls0WsRgUK5/jb+3GG2CnseUrMQhIXoRtWl0Bxt crtoiJHNACDXuubCEsv24EZU5rwmYZFLidst8ZDi+8NtHZW5tdWtcI8BmJtiAmH0AVTV reptEbjHw/aPoATQfcyRG6tPD9zsnFl3K39DD0FHw8kKdaQt3fOhOMUabEZkdnNZpz1q No5FVNH+ZuMAL8O7fthG++iNnwYY/P4T+iT6gzRqFjGnwH+hygKVDjYgLJTNXKgv0nzq QlZA== 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=h15TxzHnPEFPnun3tKl5O+7Y9A7E+k+i03nQ5iN1Pdk=; b=zD/6ZOsbGLe2x4FxEatuSylp1lbHEHu+mdbCcvOLlhBuXH2ETJc7OFoviF9a5/Y9Oo MoAyeXcE+wXQ3CYCN/GZsxqfhC163+g1xPSf/GMlbQcNYLxVGKneXHTPCc/Q/0ZEz9bG pFyEGTZug818c7D1X14L3R8GteCTEwITrqOiyORqw6ne0iGoK57smpjLsyS47aI9OIQ9 eCVwP4w7XZZej2/GQG7s9QW8PJTfd8k5Y5spjKqY0YGidoUG2lfeQH/+mLaSqr5zlGSE Zd+FstxV/qq08z0YAyKUcQtc2kswcDej3ZG7nqJKVLgb/xzSBWpVdBUTRIvy59bCr/vt 3lmw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=JS2pYwwM; 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 r139si2723524pgr.169.2021.04.29.00.01.58; Thu, 29 Apr 2021 00:01:58 -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=JS2pYwwM; 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 S237247AbhD2HCl (ORCPT + 6 others); Thu, 29 Apr 2021 03:02:41 -0400 Received: from mail-eopbgr130082.outbound.protection.outlook.com ([40.107.13.82]:32660 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230174AbhD2HCk (ORCPT ); Thu, 29 Apr 2021 03:02:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QCUt6qO8o7TLe9KRjHH4GxjO4a0MtSFgzHfq5jD5moVQ4ixD3GlCjtNRiP1m+qThTUYtitJz/201e4cCnck2m8m2b3p1ZJo9FE5dRdHWvEX0Fl2p62/gKuOTLDmXVIjlyb5ceK53fk8yX7npAYAhmv9CfS7kh3bXGA2MuBfTTnNlUVRDde3j7QF9+mjtdT0iAg+NRjoKeqRre/91OB7IlKH+OY2C6sIz1ke4f2GXn4BHMs51NfPWDh8IK/kUzKYiR5JacUTVFJfcJpDtLk/HmdR1dH5VPsbMufTj6/tLMt+uymcz7dLHhjc8HTluXxKa/jauUxpsZ2NQlD/3emmxPA== 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=h15TxzHnPEFPnun3tKl5O+7Y9A7E+k+i03nQ5iN1Pdk=; b=YhQlhXwn46kRFccDadIb5AG87Ap6l/PsESuoFdb6kCVbidFdmgYI06BVp/DtT+9gA/D3ZLwzcSL+fOcKhbPHw0sr1aXG/6EfTdYB3cFrJ0ricT6oozXTOlhjNVqVBDilA2iDPnPQNhvUrgjTrFDQMombqG19z2ZYod1hZpi0X+sD2/XSl9TOPtZY7bshoAEwmcJzkyqjr68hPCJ1aylDodXdng6Qo3mameG5Zb8SaIaO0HOU2kWQ3Fr+myrKhsuOYmEiz1ZQkxm5EgJXFtFqvArXqGiAO7iCNRcILvFPSiABtlSAsf2VI9cbmAe/cHu8Wajgfz3gzgUkUBKOjz5BkA== 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=h15TxzHnPEFPnun3tKl5O+7Y9A7E+k+i03nQ5iN1Pdk=; b=JS2pYwwMee63+IqYc9abcE/KPAmKSgxlc76o5DgDhIxbHovQMHeYjOTkE9Wdhe0iUalieRPw2S7ADAjoRxDwOXKIFNDiEFamAoAYIr9pt1roQXFE6SEo2wqL97aK5Rh+/LavbDmjP5axDRW7MSIKUDn0ifuUEV/qRTQbNsyZuB0= 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 (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20; Thu, 29 Apr 2021 07:01:52 +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.023; Thu, 29 Apr 2021 07:01:52 +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 4/4] soc: imx: Add blk-ctl driver for i.MX8MM Date: Thu, 29 Apr 2021 15:33:31 +0800 Message-Id: <20210429073331.21204-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210429073331.21204-1-peng.fan@oss.nxp.com> References: <20210429073331.21204-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR06CA0016.apcprd06.prod.outlook.com (2603:1096:202:2e::28) 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 HK2PR06CA0016.apcprd06.prod.outlook.com (2603:1096:202:2e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.28 via Frontend Transport; Thu, 29 Apr 2021 07:01:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 46a8b33d-6164-4a7a-8fe8-08d90adcaa68 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: 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: FIGYx/YOzCgwkDOkHdPLeOxVoNcUaWLX+m4yga7jsc9WETbM6h502vmSm2iR/iRaE6tX1OBTCJPdGFJ9zLQrSmhF39wKMzA7llX7nHYBeBi9t1oALL1BzVYIXpJQob9LPLgZ1KvbM+FX9oGmfx7xIck+ME835zdDlmQfmr7oy0r8dG1WnBAbS/07ntMdqIOX+3kMACrhjpRXlJaWTVJjK89C1996TbT/XDhQd5Vg1IRCf2615jJoI/zbbW1BfEYTvVKMpI43asXefhjxgsyjnl4kkWOom1Xlfj7jb5D48auejNneyB7yCpIJLwY/3tNCw80wP+4a+Q+qw7Ml5q2UN/NwwRjQ8HI+ZLZdG02sUSKTPMTXu237G6ywrSe6CU66vnmQAkunqOSMCbUddIxDhLIj7RBVWZfNbYueSZxMK7EXy6DFuXl7yFM17N4nsVc6osYycSgkbavoOkoBYW/O0nn60FA8KZWGMi/cF0qMZ8DiPPAyPZ3QIN1exIMcBEnmaZchP9b3FQcDI1/YnT7jjHM5tyJcpJzW6pLY5oQ6uLggz2XvzMwhQsVBLBZ4tvYdrnoRwmzG4zb82H+rzWJcmbQV2LV1G6/d0LVkNsGBo0Ot9VYf8BrCsvE6jcyxiA5pGntCzxQZdKQgGisvjTUiuqjwNXHVoQl5/amUAjycs4k= 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)(39860400002)(376002)(6666004)(2906002)(7416002)(26005)(52116002)(5660300002)(8676002)(66556008)(478600001)(66476007)(16526019)(186003)(316002)(6486002)(38350700002)(6506007)(2616005)(38100700002)(1076003)(83380400001)(86362001)(4326008)(956004)(66946007)(6512007)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: kyKknwp/9GtWZcQlSkWFpuE9EiNK8HeNx49hURQi/QSrA2gNuV3E8asmcDWodumeWC2jaSpZQlWNtLtZWsSF45QmXDHHhEI+IYaLr/Og+v4/0yQQd2oDDZXiMrzQGmbKmO7YcbtmIH6J0cmZPSkwXW5I0HZ9eMkjb5g7y2pUyOBcrXApVOSu85T6zP9XqXQgkXOeQVixwZioFdO5ZKLC/WWE3mE1tUg34iFiN1qEYDNaH4szDKYozdzk4+NtFLw9rzFud/JpPFrRYd/1raQTdc/G7cld6/i5rkhzMuQJPoQdwzx/zG95ynuMjU16nUqnXhF7HWoNhOSp8dPXkdlXk9flsQ5nLfQ8G0BaS3uKmmhmjGI1vrHhEDwf8Hg7hFr/z0awjEqKcpK2yxI28/h/tJ8/KF69WpvIOLHtZXWxATkGbBJGUIw3tX1NaT2PClm8u6jvkCYNHF0VQc77lDR7zsVEYSUlxZJH0FWsc4aOjgl4HZgFW+2r532avK+gzUPbBM1v/aUsOtlo5pYsQziGwQfXR1Xp9PVaMblnK6KYdlWQD3F9a89nRXH/Lt4Ych5xFtygatQyna730Pr5ZGWLj7OG39YbJcJGOKi6Cwzxg3CirwF7M+2oS97GyoTwHI0Ga3wwyIh5ke8L7x8MFONhIV7lsput2NbIp6iP//qNf0rvn39yraEZTKCycBw2z6uoNIWtY0q4bCYbYdwmFGTGA+36K5ZsWeJVcQOsBcbdIp+tVJ8Ez8+ly1yBr/hsoJb6UUeqAi4E5dyETB9YHCPaPv4OB0f9nWcPp9eFDkKUkiTjDHvzYeS0yxEzyW5xo6VaEo6S5J44bseRgl7Ync64Gmv1N68xG/ykp9eiyq5XZ3ahA+sZbbIji/wJ1KHQZqErHVS53+MOprfNxODX53rE1xWJjZ0ZI7mm03TkLhlP0QkGaaOUshO/DhaLvRfyC2B02SUXh276hmhlGMHNVrHxmNhycYUUeypYKaby0iv++Xo0ZU9ywMagwARen3XrGokuuaOCMV3YOWINyZi7neVTid7wrJILv3CkxmIKMzVZPvM8J6wjhUKy92SThT+ZH8k2vmvhmFoLgpAeU2lfvinjVrZJKyaq7zPhgUlF8Mz4PU0QM1JBEnIgGA589QYWitnzUxU/9KkUOCnVS3FA1AA5VgR7TFvP42dYY1b8ixKJGffQmhcXCT8klomGgWbgvLCqwL5WGBP92Mn8iICbEVpnqpZ8K92QNUrogqAYyMkG2/gzCcdNomMYyv7JpPzHtXnUbjMtuJwEuALwRR8q3SMfYLnwUNfYiBZkNVv8RQniGZ84Wfzfuj1ph+ip7n1qZcpV X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46a8b33d-6164-4a7a-8fe8-08d90adcaa68 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 07:01:51.9647 (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: 28o/qFODxeCfW2wkUJpBYSt1BPTfSThNXXdbm2nUAaIyf1A9C6jEggcxl5lq+WLY2ET81LkTifOTLRCDSX5yfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 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 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..77e0a5d3fdac --- /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 "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 resource *res; + struct imx_blk_ctl *ctl; + void __iomem *base; + + ctl = devm_kzalloc(dev, sizeof(*ctl), GFP_KERNEL); + if (!ctl) + return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + base = devm_ioremap_resource(dev, res); + 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; + atomic_set(&ctl->power_count, 0); + + 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 = of_device_get_match_data(dev); + + 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);