From patchwork Tue Aug 2 07:13:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12934277 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3EAECC00140 for ; Tue, 2 Aug 2022 07:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cWL7RVO4NsWbOJOD70eBoJnL1NSsMFyrJ4InTcICqLI=; b=2nJwvVgQWisS9O xpfIXvLZYiQeGl+f82QHJe7YNrY9wdAvWL4Wc1H0HxKt0/sWmX5MBXaCIz87VLgO8hPR/fDYrncrU zKK9aRHiKqTfsilWt+1rulbz+EvGhuTAi7pZkp/ivZcHZTw0DsmGOR0S70H0BYQ5iKgk3JSNrkN+X VoxlAgfaO7QE3UrbE5yHNSFPtvq/ud67hoevCLMICj/1m569JJSdOxzEGL7GNNTNJm5TTb/mFYTeA TrXdzjjUoCXR5CSFDtHVj/ZtQ8icL85gYhVwVOdypVDuGHzMKvlO0DxHIm3lcj5N/KB+9XTTXBFft oclxWkCQuOUhY87/ZBlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIm4e-00BEQC-RI; Tue, 02 Aug 2022 07:12:17 +0000 Received: from mail-eopbgr60068.outbound.protection.outlook.com ([40.107.6.68] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIm4R-00BEHE-S4 for linux-arm-kernel@lists.infradead.org; Tue, 02 Aug 2022 07:12:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fhr1w+2bk8FhRJoukBGz13tRPt99yKnoTDjz+hNd+GPrjtugNa5cpn2NE1dkvwuwx/2pwvvrPzXZMh813ZYV7IjBtJDkDO9wO50fdlVet28DCdSVbZAxYtoDZIZv/iglO04f8JT/YjSJJNr4IkcIcIvdtO03rfzZbnF2r66CfLAZWBu4O9KDZzjn9qKyHbvP1o/XI3Wl+wAkQjpH/tq/FPNa3WJp0pS5u5qwwuM2eF0WZyXiwX6ReaM8hrtM7IixCs5D2C4xGpvZ7KFpcgof+Si4DFTT5clq4/M/iJlGStbKUvq1wgU61IWZND8VhoKj1ffytSfkryEuaNpJqV6D0g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F6CfC8qK5KHiAqGJD7X8iI/+pRhZkzafg65odsgCneo=; b=KJPToPDgpzhT4lQy7eguSaG84+IvgpLm2Byvg5vcEA9XdnQqyI3BkyUpyNiwmUmiuX1x1JK1bxQfWZ4qhJOdy180i2IhKg5yzvR3OeWt90Jd9SYwgkLfjv1hUAw2dThz5HvGYMwvqctB90sUGSMoD4k0sMw/XcvzI+2N5ef+s5YgmKQDsiYLhQc/sqTa7LxJp5EtZwe4aqgRKapRefnBNSp9R4mSgGPjhi79Z152rrp1NcfXq4lbzQ+OMUE40CoAmiEJFjhDFp7HI17anMyOTMU5SNFvtE+SE/Xbfu++KIt+CxvGxL5M0vj6e5LNt4zJMtaA7RjJm2KzHjSstV6Ydw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F6CfC8qK5KHiAqGJD7X8iI/+pRhZkzafg65odsgCneo=; b=d2xQHvQf0mhsDMGNccqSf8X82oj+59NSMne9ZuV0S/VXmbFMTq2MAgcG01JNb347ULRlDYo/Zf7XNFahPU8C2xoUQecA6sBJZHCRVrcC0aP3O4G3KOPnrGnFsWLU+ACEaOBUhWyI6RjEcSZFjGwm5PE0u63gecmrJYz813XpDgs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by VI1PR04MB4719.eurprd04.prod.outlook.com (2603:10a6:803:61::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.16; Tue, 2 Aug 2022 07:11:56 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b%7]) with mapi id 15.20.5482.016; Tue, 2 Aug 2022 07:11:56 +0000 From: Liu Ying To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, saravanak@google.com, gregkh@linuxfoundation.org, geert+renesas@glider.be Subject: [PATCH 1/3] drivers: bus: simple-pm-bus: Populate simple MFD child devices Date: Tue, 2 Aug 2022 15:13:08 +0800 Message-Id: <20220802071310.2650864-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220802071310.2650864-1-victor.liu@nxp.com> References: <20220802071310.2650864-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0040.apcprd02.prod.outlook.com (2603:1096:3:18::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eb6ef2e2-602e-498a-5fa8-08da745648d9 X-MS-TrafficTypeDiagnostic: VI1PR04MB4719:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YhzZr0effVryjGB2kE8lrkuKWoZkQJtXgy1Pu1HtHslvEE/2K0iG+Lc6R3Cm+UTXGHRk64JsHTN2VGJNCO4oZ7V6/fykdFceWpRtJAEF3/egij+sCV9l/MQZux0E/j6xlZ1s3iGs7+OgRaK52f25janWVOwh4CEO9Q1l1j6YzZz3LcsWs7mDgtC+qBtmQ+YZc5x4bo6uTaCPvDu1Hzb1kk671zLrs99rOBKdqRDjcDtr5vyRD8U5cybxE1Bl+gkS+aQ1Y2mHyahw0OxNP1OhwYwnO3i9iuPednCE9WS64Rv/y1F9Vy3+tHRXzTpKQxBnWEoUUa18rMKtjh3015ArSmCOOzXyf02c50nQ9rDph3vy+AiDARXooFuMDE9rYHAmTtz7OSwxQGrygQEZuElxMMz5vVIrbMFNI1T6heudrYQOj0llNJcIbEuHn0IectX1YdCg9h/lHYtu6EUpMEoOxj3U6fQtcG1+a+tJ0GAinUiRxsMPFrwBWzd+j1GJGq9Co10HJennq2wVsbnTgCA8yW4WvQlDDyf92cQeId6hEJpIQf3b9ozA+L+63WZaxNpc6rl6gZmHtXwCK18LrRxEwi1iYEMNq8g8B4cDJECRFIS7wLwxWVq2NB1EfHcXHCKlLCj5B6hDb/QllN4ky+WEiz0ech47HcK7lvpJwOBjOsf5sokFy1gmwFB0aTnsa+aB36twELEMmomF7Wt/OVz/y5/l9NfbZXefk7wAlOTPLuskE4uO46SzOG3gE+MBnpIThJeaJAuBAlAuir5Tt3dSchjmis/bDGIR3GHxyu1fHYQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(39860400002)(136003)(366004)(376002)(396003)(2616005)(66476007)(6512007)(8676002)(66556008)(4326008)(5660300002)(1076003)(6506007)(6486002)(7416002)(86362001)(66946007)(478600001)(36756003)(52116002)(186003)(38350700002)(83380400001)(316002)(38100700002)(26005)(6666004)(2906002)(8936002)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FkK/izLFbSdacPyhqNXYhWel1fkbVrxDk4/awHTvchz/7k31rGTXf/ZIlDFA92RZXfKow7PUn8NkitdLJyw2WV8NNDNZZmWkJaBiLqbnGzSUn+cEcdc85Y85X+6yjSUUBUTyFSMXF6gEDpQc2/mDGUqZhOonnYisRuR5YYg7ZZVpk4WO/6Hm5SxivWcyQcrE3Y7bUmqVPuSbH3cY0MjH2FL5uHNg4ZZKslOyD5eiUrUbYyaxEpJ2pRQa6MSRdcIPzoRN2ASfr65vtYQ1TYPkWD0/LFxjwgOhhzzHj0DhckXD4f8D2S0kzI6tsL7HZDCQovFiy7R6KUw6l9AVqo7kWVr7tcSiPrI5HBCcrx1ex3yIkDNedqn0bmPTXFaVciGsW7vXrbICyKUiPPKdxaFE3CBhMYLxjntpArRaaNghxrNVpjoY24vaTwaMzs15AZ/H6TSWX0Ef8OrkNJsNdJ+RM3lFr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j1VIdJMUnsHw/tUmAKUaRGYNHzEPqqORSmcQ2xZ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb6ef2e2-602e-498a-5fa8-08da745648d9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2022 07:11:56.7542 (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: z7rJtj1ChKByfTgv/dY3yV/Y+WQXkKRFAI+i7heCbQNGq1ujOAYZP2M5h4sbd18Fa0BY66Uh+NX7k3IR9bYOJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4719 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220802_001204_936154_248EFE8D X-CRM114-Status: GOOD ( 12.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There could be simple MFD device(s) connected to a simple PM bus as child node(s), like Freescale i.MX8qxp pixel link MSI bus. Add a child match table as an argument to of_platform_populate() function call to specify the simple MFD devices so that they can be populated. Signed-off-by: Liu Ying --- drivers/bus/simple-pm-bus.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c index 6b8d6257ed8a..ff5f8ca5c024 100644 --- a/drivers/bus/simple-pm-bus.c +++ b/drivers/bus/simple-pm-bus.c @@ -13,6 +13,11 @@ #include #include +static const struct of_device_id simple_pm_bus_child_matches[] = { + { .compatible = "simple-mfd", }, + {} +}; + static int simple_pm_bus_probe(struct platform_device *pdev) { const struct device *dev = &pdev->dev; @@ -49,7 +54,7 @@ static int simple_pm_bus_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); if (np) - of_platform_populate(np, NULL, lookup, &pdev->dev); + of_platform_populate(np, simple_pm_bus_child_matches, lookup, &pdev->dev); return 0; } From patchwork Tue Aug 2 07:13:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12934278 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F197C00140 for ; Tue, 2 Aug 2022 07:13:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xc0dBbnZghJ1yd/yFJZrAwgV2vZmcjRyJziPH/IwyPY=; b=NhKSnkuly2oNJY gFCGlkpn8xgyVNlVSGjH+kxhWHIsNH4OSwgLyGzkqt4CPo74/9gxUl9fQzPrbKb8SS0/FykGtp9D1 aYMKqnqaXNeTiwBtko1MPZ9rIiWJw3/PWaOdGXWPYwR3pVLtw+Soy74duc97Z/8ZtpCWx32mcveYq nZjhq65U490W/jSeW/IB7KhRKRhHXOJ7BdpMyMcmbLdwqrElNyzVf7A4IwSZR8YvAc0Y8gP6oru+6 zjDDd7Jgw8VtLjjYtZ0QGI9Zjr++6CkTbTUAroqW9CtterXsJceewZKOg060uQDiRY1pmqO7DbE2U 1tXBO2aEvntcmIgHEqjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIm4o-00BEUU-O4; Tue, 02 Aug 2022 07:12:26 +0000 Received: from mail-eopbgr60068.outbound.protection.outlook.com ([40.107.6.68] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIm4W-00BEHE-1S for linux-arm-kernel@lists.infradead.org; Tue, 02 Aug 2022 07:12:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MbXwR/DdNNKHl7EvCMZvezrCULpGmGSIxkX5ELjdkitc8OLwLdjoPl0G4/dCgpf6PZnWnzp+tZtaq8F5/U7kOUnoCcLbUbawJzYy5GVW2dYKvtmZ03gbLDRfqYjIfqkqm992MxupBe4MBFu0YozH/zn2CRb7xZSYaLXDIPpmBFgmKiTuV4ZlauStFF4tOsmbAFAcHWojVOj1r/fSh8wCFnCWF1zb80rEZzB7IeOrwAnD2haCHZkaN9vrJ3/4HrNaKWcL1Q/1XWXJvHWupjIzPqntk5ArMpUhfc/vySg0eP+pOQwpXLPIauUcsVLQuFI4pR3ovikxmkMA2sckbxyTsg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9Bq/ryw6zaIOWVE2cUXPpRAAnffO8RtEUMLB9CPysng=; b=gGvxs+kmuv5TcHteyAGiRSyEgs5gYzfkFwRnm9+ynTG8e+g3Akh11or6LG2/Zrz7kU0NeqhpTMyfP3nCxXlzCCwUACuql6lc6oXIuINr9azavvGUu7D3PzoS1lT6uKUgEVaj4M3UYcXhe6m7wzO1Q+5hWr/o4AN0+VEKcpXsgeunxcZ+Ay6u0PzlofEeeivkgu74toS1rEJ05ZbfsY1WPqfJ0Zr0DE5lrVHk98wwQpPyjTXUK+uO/j/gJmgA4/6meNFrdoF6Shphkm+oc/60R5m9bQCEgnEdikce0oZyK3xaACjUIM7kgvQOOA2F4b3UgGfkCUK72Gs7QYhvES3iFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9Bq/ryw6zaIOWVE2cUXPpRAAnffO8RtEUMLB9CPysng=; b=iygrZULolTbDb3MGjdPq8tm6pTwYUAf54hEJqm5Pk20wKpMLbTioQubJzYKMwdCsa8+Q2iaG5W890tVdOxRDNKXtTzPearsBDj0Jb59EtcCnA5XdO5B7LnxO2yZEzy5Cuau7ZTGtms56WV5Mgjqghjc6boNR0r1RdtzGuuR1J9Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by VI1PR04MB4719.eurprd04.prod.outlook.com (2603:10a6:803:61::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.16; Tue, 2 Aug 2022 07:12:00 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b%7]) with mapi id 15.20.5482.016; Tue, 2 Aug 2022 07:12:00 +0000 From: Liu Ying To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, saravanak@google.com, gregkh@linuxfoundation.org, geert+renesas@glider.be Subject: [PATCH 2/3] drivers: bus: simple-pm-bus: Use clocks Date: Tue, 2 Aug 2022 15:13:09 +0800 Message-Id: <20220802071310.2650864-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220802071310.2650864-1-victor.liu@nxp.com> References: <20220802071310.2650864-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0040.apcprd02.prod.outlook.com (2603:1096:3:18::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bcd8d95b-9b41-49f4-0e71-08da74564b35 X-MS-TrafficTypeDiagnostic: VI1PR04MB4719:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dm2pFGYNzC9qSVHUxrKpZt/3p0OtoVEKuWUFL7U82ILte209IFnFeN5/YQIhBG66VwloeuZQ4NBLY1DudYaog0rwy8EsSFsLmdRg9Vai23/PkAEWETUWdmJVx+9pKMn1hcc2BDPEDrRaURKLfaODgB6eMLthQZ0br2uVHrnSVZ5KGUP8HzckHiDxd090QjByahy7hSuzpcCPWEmnM7YW8KnwmTCuxhsAg5t4Sw/8Jakd+qzKuy4HGwwr5SSeMZHFK9L1sdUCfCZHIZKM3bcRoO9lhRD34EYLEuXG0lU7xaKd79WZ+BTPRdi1hvdPqDViGXjMjY+uumy25un57OUy8twgAu2S2pWOqKfW2ezpyn4zUOxvcgAziZHffBmYt1rwBa+T8ArllsMS1AYZGQ1n5PSh5xyOhDsTdpGrolTfZBWJkRJq5Ksh61DnK4ubmBQ4bv/Nhemj58JO24xbCppVm2oNK1yBLj7WF8YmfoCjEuEOg/9P00Hn4MJ5ezM3wcxUuX1iZ7wq/7pN+6hnngsg/PUKxTwacxfD6edrerCOgUS5oG9wRGwVh/GrjX05NKxOMYs3NseKfpbm/fZ1hvDZP4lQ+W19BzgqLuXridJW0OWQxBzkBGEfroNusWHwhu6Pl/PUndwrOB/RWo7YGBeDcTiCxWBdq1DolmKbANUaIO6+6XbL1WlK4Lg22Kre0UO4fvqaf37SLu+CNfyLF081a8OixzvPYDsUtQr0sKbN9rHtIZOz5iOCakPFD0tjsz+4SyFmbhSKqN3r9pHww3JuD4bRFilG7MrLonrTf1L5ZiI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(39860400002)(136003)(366004)(376002)(396003)(2616005)(66476007)(6512007)(8676002)(66556008)(4326008)(5660300002)(1076003)(6506007)(6486002)(7416002)(86362001)(66946007)(478600001)(36756003)(52116002)(186003)(38350700002)(83380400001)(316002)(38100700002)(26005)(2906002)(8936002)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yDbmvSlTN199mp+sxsjb6vUg+CfxIC+bKS8cuO0Ilc/XVuk26mZ7GLJaqkP0NrAgHOqEEtcMA0f0gz9rcydCzfn+oyLH8Vk7kdhrmo4zAuJbpFDmChAxH2jYVrvrTytEiIwjFYITDQZQX30zAZ/FUz8uGjLKbOsK2vEKQWVpVxvoawmkDwfR9+e+kyQcWdW5GTUSv4fDw/pHv2ML79uscLkMF8ljoQCRcF2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J+Si1PMHhhArG+PZoYhxLOwMuMbJyIj422lIJWB2vbg61rVAhwuUhuumpoesub0sWzGLZcl56Fs3AWyDe6JRU6X6KOC6XX4ED7ixu15WIz8sk86e8ZRqWy7WBv+uqCEfR0sHNzsX9FmgEmRZ7Kbst8Q0fzi0HfaFVBXVtN+Zk8BkXFPOuHQXDu4j39Q7pb0MwwfdWpB3lfOuka3t6iONvXPrrAqOFx7DOLTN/cOzQ56ffXdofH3hPK+xGLHNOHQT+zAh7D/lQiXDbOYQhYaDLod/Ab4FoEjnHggGGX2SuJbv3p3Hp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bcd8d95b-9b41-49f4-0e71-08da74564b35 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2022 07:12:00.5700 (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: g2aMsrcZimZvgfC7mwOn8vJjwtmN3DVsAppagL55g+fR014JyDKve0i1TvBzQtgwvNbnCUOKoKlujXv+wrm0yw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4719 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220802_001208_136170_007594C3 X-CRM114-Status: GOOD ( 18.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Simple Power-Managed bus controller may need functional clock(s) to be enabled before child devices connected to the bus can be accessed. Get the clock(s) as a bulk and enable/disable the clock(s) when the bus is being power managed. One example is that Freescale i.MX8qxp pixel link MSI bus controller needs MSI clock and AHB clock to be enabled before accessing child devices. Signed-off-by: Liu Ying --- drivers/bus/simple-pm-bus.c | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c index ff5f8ca5c024..876a906724b3 100644 --- a/drivers/bus/simple-pm-bus.c +++ b/drivers/bus/simple-pm-bus.c @@ -8,11 +8,17 @@ * for more details. */ +#include #include #include #include #include +struct simple_pm_bus { + struct clk_bulk_data *clks; + int num_clks; +}; + static const struct of_device_id simple_pm_bus_child_matches[] = { { .compatible = "simple-mfd", }, {} @@ -24,6 +30,7 @@ static int simple_pm_bus_probe(struct platform_device *pdev) const struct of_dev_auxdata *lookup = dev_get_platdata(dev); struct device_node *np = dev->of_node; const struct of_device_id *match; + struct simple_pm_bus *bus; /* * Allow user to use driver_override to bind this driver to a @@ -49,6 +56,16 @@ static int simple_pm_bus_probe(struct platform_device *pdev) return -ENODEV; } + bus = devm_kzalloc(&pdev->dev, sizeof(*bus), GFP_KERNEL); + if (!bus) + return -ENOMEM; + + bus->num_clks = devm_clk_bulk_get_all(&pdev->dev, &bus->clks); + if (bus->num_clks < 0) + return dev_err_probe(&pdev->dev, bus->num_clks, "failed to get clocks\n"); + + dev_set_drvdata(&pdev->dev, bus); + dev_dbg(&pdev->dev, "%s\n", __func__); pm_runtime_enable(&pdev->dev); @@ -72,6 +89,42 @@ static int simple_pm_bus_remove(struct platform_device *pdev) return 0; } +static int simple_pm_bus_runtime_suspend(struct device *dev) +{ + struct simple_pm_bus *bus = dev_get_drvdata(dev); + + if (!bus) + return 0; + + clk_bulk_disable_unprepare(bus->num_clks, bus->clks); + + return 0; +} + +static int simple_pm_bus_runtime_resume(struct device *dev) +{ + struct simple_pm_bus *bus = dev_get_drvdata(dev); + int ret; + + if (!bus) + return 0; + + ret = clk_bulk_prepare_enable(bus->num_clks, bus->clks); + if (ret) { + dev_err(dev, "failed to enable clocks: %d\n", ret); + return ret; + } + + return 0; +} + +static const struct dev_pm_ops simple_pm_bus_pm_ops = { + SET_RUNTIME_PM_OPS(simple_pm_bus_runtime_suspend, + simple_pm_bus_runtime_resume, NULL) + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) +}; + #define ONLY_BUS ((void *) 1) /* Match if the device is only a bus. */ static const struct of_device_id simple_pm_bus_of_match[] = { @@ -90,6 +143,7 @@ static struct platform_driver simple_pm_bus_driver = { .driver = { .name = "simple-pm-bus", .of_match_table = simple_pm_bus_of_match, + .pm = &simple_pm_bus_pm_ops, }, }; From patchwork Tue Aug 2 07:13:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12934279 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 943D1C00140 for ; Tue, 2 Aug 2022 07:13:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X5lPMkCBMGrOzQ13koTqqnSJtdeEXQk3AzTGnN5K8II=; b=Uq7HqW7msiUNjC ASOb9if901wJ11RFmGX8AoAx/lYcTzUf97+PRTG5Bssh4ZFH3QG9XdMU/oBv9UxNFa0B02GZHqVOC 7d8Ocp3ErfEf6/x/J2XkkCjykBfGnCKj4GlEXzqs9T+GpYriQnZtjELuR3W01ZJzSp+l3oFR7G7PU WbkZGBkw8LBnTnHtCaIbQy7wmMyFT9lhfdxeVh5hSzAPh/hotA3rAi4sqQLTmzTFwpIVJldCNQfkR xcT8IUGBk94/hxN90osBiZviOd9P5EfD0w6CzeM1JmP+m2Y3/DXD6zUIPWThZA6Bgnhjl8uJhYju3 +WMdsfk+ci2jjZZHB/0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIm50-00BEZ1-3P; Tue, 02 Aug 2022 07:12:39 +0000 Received: from mail-eopbgr130075.outbound.protection.outlook.com ([40.107.13.75] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIm4a-00BEMW-7v for linux-arm-kernel@lists.infradead.org; Tue, 02 Aug 2022 07:12:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FvLS0KldQDfyBzwAcb/M1PKOd52AXXk8HskmvEAmOl3LKjws5iCdJnqCN0RkSOemS7dWAlxgDvlSo0cDCioNz9BcyP/3c1RaH9p9LJncliLAzpr8QLfdsWiVUoQR7iLOYjZMAtpZk+P8LyQypztm2uZceR0ggKeTXii8B1Mp9kx+IGufTbSaDyDkNHM7l9VXLCXYEoC9lTXsaSrLQiw/5uG+GtNrOOF0D9sW5gP+r21RL73wRDPBIbeVI/9GLWc/RQShJnZi79FE0G7PVhPXV0wBCp/siw/TjSDR6QGIS8opEMF80UfFw5tDES7hi1eVP2Csj7LYIcJgFzemDQu7iA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3ms6NgdvbI5Hv+GUeldBoDjchzQ1P/GSj3+SydPlgRI=; b=m/AY6LB+d3hR1D5oI12G08rmu6+9zs7VycyWjLMn6TkHjEEcICfvbERokMSKCOXKn7Zlv7UOpuYYI75gKVX405QFs6n3f+x1x312vTeF+jh4jNoFtb8L10iNi0vuHAlcy0NANmgBYFohiI97AkXv20Twf6zN+XsnFr2xU4ZE7DicB6zxmuy6eYPdm+s/QZfcUchhsCXhlzzo9bCJgQQCfynWaca4AiTv+uE6rNDy8w4mZ+J4AN01C1JFoLZ+HXb59RL6ikLvT36JBNZN/UAgd5Z1Xb6axtVnDSePvXsAwWrtY9JU65cv0X9zEBPA49Kiy7//VdGwo4Zt6g6R5PMQ3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3ms6NgdvbI5Hv+GUeldBoDjchzQ1P/GSj3+SydPlgRI=; b=WBYXDxl10w04aASiQUceLY9ykOoYrQPDQfzP1i2nc83bsO0pAqjSx8V3weMU8w9lB6gt69zBDOtfdw+3o9mkB1D7n3zSXXPYlrzGztfiQnzXwzwqZWn44J18EgJCipojqEV7+9EVcgV8ODCX5Q+EoNwA2xHQz2R7WjL5L5/MQsQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by VE1PR04MB6429.eurprd04.prod.outlook.com (2603:10a6:803:11a::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.16; Tue, 2 Aug 2022 07:12:04 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b%7]) with mapi id 15.20.5482.016; Tue, 2 Aug 2022 07:12:04 +0000 From: Liu Ying To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, saravanak@google.com, gregkh@linuxfoundation.org, geert+renesas@glider.be Subject: [PATCH 3/3] dt-bindings: bus: Add Freescale i.MX8qxp pixel link MSI bus binding Date: Tue, 2 Aug 2022 15:13:10 +0800 Message-Id: <20220802071310.2650864-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220802071310.2650864-1-victor.liu@nxp.com> References: <20220802071310.2650864-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0040.apcprd02.prod.outlook.com (2603:1096:3:18::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a3b7a24b-38e2-4328-ad3f-08da74564d7f X-MS-TrafficTypeDiagnostic: VE1PR04MB6429:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: okdz90Wm7G7rLAKOfe/XmLm6zE41PxSPDnpZGNHJO//FD0KeJFjjoqZYXUHdQjVAjN1H3NNMc6/4lscOQpfldxOSNwy8M3HfaX2g8IS/NVyTr4CDcEyO1DR4h21mY6v8JqojFuUeanU8MAByog/MY/F+UuW81Ujs9fKkhtfu/yW9TtxLvnq5VuQTl+j5RetHvAxpKi0yDkv2BJ9U/V0gEswQ44SU7A+DMQGSrc7ni38iGmVRGJVBff+f3u2GYYpxbqNRqZeHn8NSf3cztgxXt3bKw9kcH6G7bc5fMKLXk/ptdNoffOIZoEGMQ7GbtdxvCwT6cm9eNp7T7II8/BVbYj+JD9jWTSIHItyLnl8v154niVof9k9LJRUslzC5tZxJSXqsHZEWF7tfqqAv729dLdocIC/gq7Ptrb8UtgNJbId6oF/S+5XqFY8BLCb5Jom4JhYXBfIRy7Wk+ox8TFIr6D9Ujs1OqwEn6ZEc6vzBigjJfC60c9Zg1cgPwb9VssA/ucmwZnCnH+7Z+dhLQ4/NotA256l55/7KXodi81iqifRjDGFb/coVx/Z56nCrDlz2j+Fn0wj1i2OgVxAcg7WTEEre97paWzndIdgEQCBZMN5BaQLnZvDdP6pwWrkfKvhD+sEVJ/nFmuzHKr00ECCQC3j9ObP0FmlDjcKto1lUUs4AdZrzPNLFn1A7pM27NsHDwYYTcds8K2Ot0HaqKhb4MBxdqV1XWUybpRC6g3IiNbInVXpq3epD3CvtKcYOqkZeW5DX9/jCL7FEfd8vzOhXaBZWJhouNydIsGYlDjSb693sOXuf1bP+QmfS2qltjP0tGKXfHjoyqdpT6MepwkSph3rKPulY20GEgjOoz4i0SJY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(136003)(346002)(396003)(39860400002)(376002)(83380400001)(1076003)(2616005)(186003)(8936002)(4326008)(36756003)(2906002)(8676002)(5660300002)(7416002)(66476007)(66946007)(66556008)(316002)(86362001)(478600001)(6506007)(41300700001)(6512007)(52116002)(6666004)(26005)(38350700002)(38100700002)(966005)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-Anti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7WLisd0cvt7T0W3izEmIpuHKlWRMBn08P8cvmup5VC6Pj5ariUTLJq2ethQbOcD+F96FKh61OLwwpn19RzRlzOnuoFMc187UEHqJ0wk0w3hXdBQqvLMclEv4L/e5cYm2AtJwb70Mvr+BmzkT2lWn/RJWwPSQbWexoVvXFQR6jh9dTDWbe6y9H9t+Lvkz62XGYTEW/l359K8aTw73/4rs/v4vgXnnvPC6DOAOF+QTOIYxeXNVWPzm//oyh57QX6U44sLWPD5gj+NlokGWlrDERWdMOgKwnYT7w3K9+aDtICi2ozd548zVL7IFu+0apro4RVV5KD/1pPkaqla/940YuLIMKrzhR0nM3GF14A34Qv8n112XnPTCuLz4+R8MO/kuTX3zBhoGz3XOd8M2AkPJTmLheWJdyIJ6MeWIDRUKB2tmNbtqt7i2Y7V0CqKGnYAia1y+46If7aVigo0NoHsMcvKWn78WmFQ9jiXySrnsNy2L5JLSe6cCqIyNNSC4TU5ujS0qxX6BhCkN9z X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3b7a24b-38e2-4328-ad3f-08da74564d7f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2022 07:12:04.4131 (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: 4htUVKorwC9t7JlvjAN5jpDNdRDzLQ2uM6r1eKjrtlf6UTdaJpKTJsS2wNZAs6Om+7sc/sByXJvBQyHjK9srLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6429 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220802_001212_634443_1148315B X-CRM114-Status: GOOD ( 18.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Freescale i.MX8qxp pixel link MSI bus is a simple memory-mapped bus. It is used to access peripherals in i.MX8qm/qxp imaging, LVDS, MIPI DSI and HDMI TX subsystems, like I2C controller, PWM controller, MIPI DSI controller and Control and Status Registers (CSR) module. Reference simple-pm-bus bindings and add Freescale i.MX8qxp pixel link MSI bus specific bindings. Signed-off-by: Liu Ying --- .../bus/fsl,imx8qxp-pixel-link-msi-bus.yaml | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml diff --git a/Documentation/devicetree/bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml b/Documentation/devicetree/bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml new file mode 100644 index 000000000000..24f50535f5c2 --- /dev/null +++ b/Documentation/devicetree/bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Pixel Link Medium Speed Interconnect (MSI) Bus + +maintainers: + - Liu Ying + +description: | + i.MX8qxp pixel link MSI bus is used to control settings of PHYs, I/Os + sitting together with the PHYs. It is not the same as the MSI bus coming + from i.MX8 System Controller Unit (SCU) which is used to control power, + clock and reset through the i.MX8 Distributed Slave System Controller (DSC). + + i.MX8qxp pixel link MSI bus is a simple memory-mapped bus. Two input clocks, + that is, MSI clock and AHB clock, need to be enabled so that peripherals + connected to the bus can be accessed. Also, the bus is part of a power + domain. The power domain needs to be enabled before the peripherals can + be accessed. + + Peripherals in i.MX8qm/qxp imaging, LVDS, MIPI DSI and HDMI TX subsystems, + like I2C controller, PWM controller, MIPI DSI controller and Control and + Status Registers (CSR) module, are accessed through the bus. + + The i.MX System Controller Firmware (SCFW) owns and uses the i.MX8qm/qxp + pixel link MSI bus controller and does not allow SCFW user to control it. + So, the controller's registers cannot be accessed by SCFW user. Hence, + the interrupts generated by the controller don't make any sense from SCFW + user's point of view. + +allOf: + - $ref: simple-pm-bus.yaml# + +properties: + compatible: + items: + - enum: + - fsl,imx8qxp-display-pixel-link-msi-bus + - fsl,imx8qm-display-pixel-link-msi-bus + - {} # simple-pm-bus, but not listed here to avoid false select + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: master gated clock from system + - description: AHB clock + + clock-names: + items: + - const: msi + - const: ahb + +required: + - clocks + - clock-names + - power-domains + +unevaluatedProperties: false + +examples: + - | + #include + #include + bus@56200000 { + compatible = "fsl,imx8qxp-display-pixel-link-msi-bus", "simple-pm-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x56200000 0x20000>; + interrupt-parent = <&dc0_irqsteer>; + interrupts = <320>; + ranges; + clocks = <&dc0_disp_ctrl_link_mst0_lpcg IMX_LPCG_CLK_4>, + <&dc0_disp_ctrl_link_mst0_lpcg IMX_LPCG_CLK_4>; + clock-names = "msi", "ahb"; + power-domains = <&pd IMX_SC_R_DC_0>; + };