From patchwork Thu Aug 4 06:11:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12936115 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 6F5EDC19F2D for ; Thu, 4 Aug 2022 06:11:40 +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=E071edQqoV+gA02e+Ke+90EU1sPSPCLC92CP76zxpzI=; b=Xym9h3Ph5OOLYL ckAG9UTds5ywKwKkKCTMxFYhJKK5lkYULzu9QTw/KrEh5sTxgT2l/2S0Nb/XlBhch5lgej/DxzMwW 6XYAaQWB8WMxZYZCzEA3iotsUMF1A9nSzmoXXUc7Ecatiwqp8u096E/FM2pebphDPq6Gvdx1nTyrZ v+tKhrlRXQfVXV9FPqL9fqm2oVCqP7uxIaH+NwTZQgN271p3iGV6yLiI6g/pJ8bRZiw9aPCZ/wTeh 9bWKiLG2vxkjfn6cznmDaqYbNSFNX6v675X1jHVPcEgxYCePCv0u97H1q6IuM+sLTIqcHq0hzqCuS HiTiXuhIqPZfRtt7NYMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJU3t-003d5R-Bg; Thu, 04 Aug 2022 06:10:25 +0000 Received: from mail-dbaeur03on2074.outbound.protection.outlook.com ([40.107.104.74] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJU3Z-003cgh-6Q for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2022 06:10:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QbAvvc2xUbSK9LyluV0p90klBDS0OORSC74N/3A7j8dqdgHCUY7jp2N31GxJE3WCGggYsaNytvodX0BBzhA+1U6K88wV6eZyf93IeOHGRXdSE8H12FM9uD8pFEKNEaASuEw8E3hcO+3sc3q7FowAtho8jBLEEN2TTqb60ReVtJp2A08H8m9vbAWWBKgeImsF5lLzfrt8s2irMoBgjHyNI7KNFGE/8nstm2tF7NeJbxIa5jUhtdAg18EXQQ/bXIXGU3lASb/S1YTr/boNucFy3a11ysB59P5+DJbgjmnjN60fNi4x0qTpihEsr1vNp7v4+V9bFxi51vTl+Fu1y9acOA== 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=kWYG3po13cDVDOS3mxdIqYHUJ2HrZYlyJXjrWF0yZ+w=; b=m6qhnektr0BswaV0DYaFWJHiJOSv0EIWop4nsWGqschCM4Rz4T8awupkXcZxIJjpt7ImWlmHOlsGhkmXfNaYt2eBWxyAQN9g1y94C8p5cL4ol7GfG/wJLGWXgsPY9vEXIinjoEMHifrlN2IbdcdhZ1DV1KVp2Wzk0v5Jog6D2/n+Zr+XrbtwFSKyUB9HpEYMKIhUrhZRuODvGdJ1xmcfER1eyTuh8PA0IGfvolgPWrChNdG9o3DOiDmQDxGA/fuVV1n3Nv6eYnXirAC+hrtw9fLGamWlamWx2z2vNMnHetkwgJlcjKObQ3R696QR1sejkECT7EL0Cs95cHFvp69T6w== 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=kWYG3po13cDVDOS3mxdIqYHUJ2HrZYlyJXjrWF0yZ+w=; b=HraLyZBgwMK4tcY9iGkIYPnl3s3FIdug1DLPXmZ6Ohl7SiBjjflBQnYJ5jZcdoBiQAT6QD2Rw8O6lEKe4PMcZ4Cuym5HyeQNN+QoMKE8GNEMKihOghtPGg6FMtxQn2iRV/8a0OeETNpQ7lzEfFx8pQPORoFHF5Vx6atwQLOLkO4= 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 DBBPR04MB7721.eurprd04.prod.outlook.com (2603:10a6:10:1f6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15; Thu, 4 Aug 2022 06:10:02 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b%5]) with mapi id 15.20.5504.015; Thu, 4 Aug 2022 06:10:02 +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, krzysztof.kozlowski@linaro.org, robh@kernel.org Subject: [PATCH v3 1/3] drivers: bus: simple-pm-bus: Populate simple MFD child devices Date: Thu, 4 Aug 2022 14:11:31 +0800 Message-Id: <20220804061133.4110734-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220804061133.4110734-1-victor.liu@nxp.com> References: <20220804061133.4110734-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:4:196::15) 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: e68fa8a4-dff1-43ab-78c6-08da75dff7d7 X-MS-TrafficTypeDiagnostic: DBBPR04MB7721:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /mv9Fx9GOZzNXxEkWwHljM0HUnDcZRq7b1F1QsdnEyJYmIxF7r+0oGS1Yzu+d2OR5hI1yABV/2I1k8QqL+WiizbvhBKPkL3RKChvsHAKLpV8F1qoiXExd3IJVJcScbqnkjS7z8USAi3WnD5h8ZOYJlVcqBcHtHbv4/AF3wlM2AbtV6Aj/UFYFp5J9BbFj7EOfDzkZQczmDty26w/tRRkahyvNdHW8qqx4al+3oNl/4ALLHcR1TFJiZhDs4iWnr/9oU3VDfx9KQmsDuJTO9Lu6yTUqYH3mBzVn9gUSeIzFeuVoQIesjVwBUItoGDf2HkSD4iWEltNkJAfiJyTHwinyml89eL7jfdrohpODIUl10izf6jeT4Szgyx+MRD4z6ldojvw5jyzMpulE64dWONK0EKQJCOexDLSgy/GGgCfwdUWwsrZCIjIRygc5Cl48esTMC7zyrfOZmFiybZ/CzybFGWvaIiDbL8DbsKynM+06Ku5QD8MviEtQyfc3iXWLZUTKyeKBVYDu0v3p8z0x8o84+yU07owSGV4V/cs36gunzJp6AZ9qBnfERshaexJZx0yAyVYaJVP8Z4SuMWU4KBMMQjVpmFoVb8exmXCXu4beBZEu01XKzl/TDQep79EfiKRKIGW0WzkcD5RoOhfegtd2vraxg+C1sAS1gCPAovkcPD6BEjCL8qwMIaRaeG6O775PAf6nZb1RCHT1jlrxO6+jSmuyfeCqItT1uqlrmEBnAubzqArfnvqLbHaTfWWmmSaaTNoN+qvDb/yj6xD9x06wuFWlU02xO96uv4HQpaGRcA= 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)(376002)(396003)(366004)(136003)(39860400002)(52116002)(6506007)(41300700001)(2906002)(6666004)(2616005)(26005)(86362001)(6512007)(1076003)(38100700002)(186003)(83380400001)(38350700002)(36756003)(5660300002)(7416002)(66946007)(6486002)(478600001)(4326008)(66556008)(66476007)(8936002)(8676002)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: m/v/i4LSO898XXU0q6QMz7bNeFhlcQv0SmmJ4tpXv+TIR6alqzPQofleDRrLEDlfBC2CRQZ6ml1ieYtm0c5dAmTuZUHsGOWrA0rY7z07niH+/GysTs+DXSikWPt91L/mNY0M90VDNjBUAkdt0FSGMdboPtbz1VFJWe8k/EbzBgLboU3wy2xYo8usdkO7GopDnGRDbHyPOIA86Zi+V9SvzSpj1Xsv/Mn++oqW/CvnjuMqGgxGrZxcP57tCYWyUGs98pd2dTb4XPKuCdc1mMh2PL3wcD6lqufRWN8psgGRS57PMP/K+g2kJci+AXwtt8TX0iO1pO059dzRkfMSqr4jUAgw8znSj1Bbqva28K5E1WYMxz1vY+5ixZMS5LXt1idxp+wBHXV/0t+2LfZMW901IcE1OMEp4ZmdvRv3L8M0a8os4dWTTZhmW/Hea3JtOc5my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NpduqFQ2sXdkyn60T+psPrXd1G0c4tuKBA69XT+loMQfbGXXO5IH3Xwu4GM8dI X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e68fa8a4-dff1-43ab-78c6-08da75dff7d7 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2022 06:10:02.5251 (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: qIQAsjo/mYbdMX8h3xS9OFLqqVMSgoyzv30g54Yc/say0b56nxz6bDQ83xB8mZZz2TGya4P25EkJQctIKu+Edw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7721 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220803_231005_281476_1E91633E X-CRM114-Status: GOOD ( 13.39 ) 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 --- v1->v3: * No change. 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 Thu Aug 4 06:11:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12936116 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 DAF65C00144 for ; Thu, 4 Aug 2022 06:12:20 +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=j87EipEhrW65MNtm6PWc+ABcbFaDyJUZYrxoc1Mk2KI=; b=LrgavL33Snq6QU l7tTYWaFzAk7TNMCn1BQPrlq1TXogsNdfa1voZfnCes8OD95A18iGymvtsUgAkeAYM0dsJh7TxdUj s4m3NyHK931fSUoSIckf1KgEnoRzLptQ8st+3IKgH/+UGYSsme3F2iRVFjHUwERcLhUytHYdVkpO3 iCbjIKCbxF7q9nGhncHv2eRu9NG0aqgw1ncIxjsMjLgkscZe8QdjrFDY77jGrt/W+qAMYZC6UPA7I 6xOed15e5DLHND/b7fkbZ1WAsiiMLbXnlfGBqYkg5svx/1B00iH691QaGk4wM3nqdfoNgvfgSCp9J e6BKVNfYsEAB/6V4Vt7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJU4f-003drm-Vm; Thu, 04 Aug 2022 06:11:14 +0000 Received: from mail-dbaeur03on2074.outbound.protection.outlook.com ([40.107.104.74] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJU3d-003cgh-D2 for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2022 06:10:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=me2k1ch32RZaKOLNJveWl8CKKfC8oTyk79KDZESirGWB7SuKCN8RQ01VbZ5ta2XuudXqlmrwdJWXsbRitcaLPZvzHaX7XROIMoBSDtDFh0ZsCn8n2/10ZsNoV06XZXv9pry2x/8BXehhs6beIzhwGb9yEVHtn2KXds6tz5mBmFdPQvTMtzlUl94YeKvB+qLjOPNxqPJJscdr3elwvY8nPfQgA4TF+b1phixpsYah1dVB9czJskz3kksmNzbPGkGxJ4/vshw6LSDLfoOMIBpUjUPW38jTkotJ0a6jyMJQu6mxGi+B/eRRwziDVqzakgniJIswBi6Azpa8wRndOvH3EA== 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=+cXqdukLYvoD3PoaWKWqCpzRfL7yL/1jbZuERYXh5bw=; b=gycatOg+MLkzk8V0n/5ehXA9/K1WV6MrFDWlbg8bVDTIkgaMizWw3SF9EjD2SlsZ8bBJ7CADb0KnrobUFlSoDvNGUmodylta5uFk2TdlfixMJXz9PRH4IMWbX37caSsYfsGasJyX2wx92I+gNBb4olKV8f74TB78vBYlhPMA0+ECNu7uSlPW9LqJEt619OQfJtWTyIFUlgphsH9Xpq6QNLM9XU78HiL95zDXsldJRUV3mSl1hCRuQux2WdFPYqmh2VM8LclCktaPvu/eiPYakC+9D2Z66RdRFtHSFMrfUXJfsDvLJvnRqLI4NZBvlz/hhhPmU9xBgy8IKtlTfGkRjQ== 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=+cXqdukLYvoD3PoaWKWqCpzRfL7yL/1jbZuERYXh5bw=; b=Y8/PgO7QxOaa/9ReK8soO2OiZTJVcmLUnQbn6EKHGWkERZoXq8jdhPC6GTrW8CZ3zx2t7aevxEYuOQAS7KgJAOjVsBHUozKKSdOd3NPK3hRr2h523VxM2qzyQ1LW51TxDG1bTJ89D8fLfH42M8X7I0Khi0f24UjcLQCQMpgDWgo= 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 DBBPR04MB7721.eurprd04.prod.outlook.com (2603:10a6:10:1f6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15; Thu, 4 Aug 2022 06:10:07 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b%5]) with mapi id 15.20.5504.015; Thu, 4 Aug 2022 06:10:07 +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, krzysztof.kozlowski@linaro.org, robh@kernel.org Subject: [PATCH v3 2/3] drivers: bus: simple-pm-bus: Use clocks Date: Thu, 4 Aug 2022 14:11:32 +0800 Message-Id: <20220804061133.4110734-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220804061133.4110734-1-victor.liu@nxp.com> References: <20220804061133.4110734-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:4:196::15) 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: 74ace029-2bb3-4fea-c75a-08da75dffaa7 X-MS-TrafficTypeDiagnostic: DBBPR04MB7721:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KQNFc08hLbJd6q4bLCGz1HMCkcGcpveY0TgVykX1Y2uvLpkN1cpKphfSQcZ3gtAve4JtaGDrLyxgidMUo0EWzUv3b5yOpELAb0g66e+Bj1vDBS4gBzPlhJ/rqo40xiAnasnURNrOcxO+U1Kw3MHf8L82SqtO+Ahiv/9fGunO9OH0el0W0hOJnz5bcCEYyiCgy/qAzXANpkl7begxw3trlMC7duRsI3pvU/hfn6MPDFeeJHqbkORH+h26k3qDpma/dVP4eYpu7XcxnMgI2XLYPDjAj+6BrgE74Uup9RuiN/H1YVVY2QbIigM+rHNklSNeh3NgqJsb8KJCJqrhGL2vlibOLpL9trN5tnsFAy9/i4d74NIdl2r4fsQlvxuxz9TI9ficpoggNLsYKDC6E7xXJDRbEMYWaU7AaG3qJfSSieU7HP1YDVtWclFcpvY/yGxmOt+Ur/OROX4cKGQTXtZuah7SeeZ+mBN2CF5ig5zXj3KI09KtMkOi8nwXqMHRYzTDYSPi5Iy7wPb2HPohd3P6I+/7bdBpIdWs05JHnDuoImYgbSwv5R/eRe65aCVvSUOIolA3ueS4LZu458CRkkDksZ6IowdDIHl1btU34Amp2sF1DrYyC2Er2XYlaHLmGrZGERD6x79w46e9NjFtNhksv7WaafBx1jFxxv0H9NCmbWJ+I32+DMEi1Xms8CmE38kwMZtUraeG6ZsidQRoW6o1/774ynVrgCCfzc0HQNTGvOpaCGWx31gA6Oa7ddReZ2dVfvZLr25GLb8i+DCEHPqfI2+bZX19oZw0pEUj3Y0/CS4= 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)(376002)(396003)(366004)(136003)(39860400002)(52116002)(6506007)(41300700001)(2906002)(6666004)(2616005)(26005)(86362001)(6512007)(1076003)(38100700002)(186003)(83380400001)(38350700002)(36756003)(5660300002)(7416002)(66946007)(6486002)(478600001)(4326008)(66556008)(66476007)(8936002)(8676002)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UHMcGbyzp/30edO0iwHPvlxdzn7l/cTOEwX9K3IBuF5itPZP3NTGBp3vdP/eJcIIJWWWZUNW4aT1plst08vW4mahKdyFFTrqVSzvX/9jIL5srowV9tjuvVPVCC81w1DeOfx4sG9A+VmeXvs11dZvYPHAAVRUu4S0MWeyrlN4bNgLOPCwb47jm0EAjLh86/XRljnEAcOyC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z0lQPRf99GpK0Lk7PjSqgtz5WUstru02LAAtiXzJPUgXPJf5/e5d5jlvAd0WwkxNTpV+4BdwZbQcdmmvp1gUYkRq10Q/pnCx4eoS4S4T2oI3+L0v6PRmhBp46OKPnrep+P98qcL/A1piB1nEg+niQTgZuaMBT2hY5D2+t6x0O6gYvs7eRU6lkZ2CMaOqVStsacC3aZCabLI9sCif6joUliBXnLXgW96RLEttajPwNnU/dFJyq2Tub3yeo1C9Y2QLrjy5CPXOPxivadRsFS+p0Xu5LJTX0W0NCHAdSH4DVG+dehUbk0ut X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74ace029-2bb3-4fea-c75a-08da75dffaa7 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2022 06:10:07.1379 (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: PCSetZPYQtKklPFHhDA2nKIagnypxx36XZsxOooa+L2v80MMZuWOQQICzQZA5sGxoh0Mtnxytzk9DjMHSu29aw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7721 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220803_231009_487746_F0D4F979 X-CRM114-Status: GOOD ( 18.98 ) 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 Reviewed-by: Geert Uytterhoeven --- v1->v3: * No change. 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 Thu Aug 4 06:11:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12936117 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 5CF6BC00144 for ; Thu, 4 Aug 2022 06:12:32 +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=Dva/vuSSPNJKulyUkvdG5aOVzqmUTEcmAS+4AmGqrgo=; b=GY9FPAQI34ieIJ lAv0v+vHimOumJeV9FRblWpnV+t898nl8+hHhG3yhfy6yUmn2gR9yxtQ2Djy5I2ckczaBNwSuUmB8 V5OR4iu7amN6PY8fcavoJu9aAl22JRWmdd/vNbIVeZNtKrq81Bb6NpoQPTSVkgRAT5ih36eVqIAgf iKedoZjudXKHwwoXRuIdFsFxCcqysu7JWJJ9h4MawrEOoWC8s2P7oHJC4X5LzhqqIgHthJ5kGp9VY ZeGboxxCw7mU3FYqY4Z414LYWgUKuDSugCJnLvRbCt+HB3tWMZi2VEEuiUok7xPfwFq/A3IgqKmKs BSgwACE6ZDCAvV3OvRzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJU4s-003dxq-MR; Thu, 04 Aug 2022 06:11:27 +0000 Received: from mail-dbaeur03on2074.outbound.protection.outlook.com ([40.107.104.74] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJU3i-003cgh-QU for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2022 06:10:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WIl9RYFpo+cF3HvjH0micAV4mT7B3JWiE3Ktbw445q11QoT3d3hqur8xOk3Jd91v65X+3HqdkYVhrtWAzuJuw8pVWjDMD+AhkQyP/4tKJyN32aY053fXwDDKY+a1eztTNlzT1OnU8bUDSKJqHFrv3jSRjj3cP7YSjuwmf/5kP5ljL8DwCBpNbrbtyKEN05TTu/1EsI1ZHPkpv9zCgEcctxBZyhPnyKCMqZKjjuFl8asQypHhLySWIIvcNYWCHSh4cw/KMMNdq65BB7oq6zcl7+EOp9bnQXHH+s2wXRRcSD+WI6BclLT8x+BG+Fwl7rPyse506AjpE/iBjFhCFqChTw== 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=4BQGKeCLn9rgRYIv8E0vnMF/lAYZtm1zchHbCVzbH7o=; b=FpafqQgaKT8wBdtO7PqKEmNlnEbNpKxKzlABBoVCtbU2Z/KYltksiENEWua6T7+JlIfRXZDPTcs28qerrVxUCxmXoz7eJt6OHenYJQKiMP7/vK9ZTTa1jhjogLJqy8gS1kimKa28nH50FIMDsduJoa9ksTuPpsuFOWs6aXcGpdhLNs3jX5WpUMQlCnwk6TGNKLOcpi+zBcFy7PnDi0dRNLhY252c6H7C64746weTPypdby9/BqM/NFy0iAaAGK6b3YI5yujibCXZpOkkpgUbAD3FtQ0cJw2kvva7U93BrvLSiYiHKY7uzAwgcmz/l3e7yPHPUOW3vC020crb7zBA8Q== 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=4BQGKeCLn9rgRYIv8E0vnMF/lAYZtm1zchHbCVzbH7o=; b=kg2jBJXA4ezt2bedfapmhx9uu9EhL56b66PODvwtnWODQpJb/HYQlqqFmkiPxIbluvytHhuR/PSZIHJ2MFVqPdBYwsgmL3/6WmZMMwdtMYeHm9egdsw0pxElBHnP7OXk8SFGFZUZAWhwIUxLTxhUyjnOpWpAcWXquSrOHNrkJoo= 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 DBBPR04MB7721.eurprd04.prod.outlook.com (2603:10a6:10:1f6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15; Thu, 4 Aug 2022 06:10:11 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::2549:869e:d80b:3a1b%5]) with mapi id 15.20.5504.015; Thu, 4 Aug 2022 06:10:11 +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, krzysztof.kozlowski@linaro.org, robh@kernel.org Subject: [PATCH v3 3/3] dt-bindings: bus: Add Freescale i.MX8qxp pixel link MSI bus binding Date: Thu, 4 Aug 2022 14:11:33 +0800 Message-Id: <20220804061133.4110734-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220804061133.4110734-1-victor.liu@nxp.com> References: <20220804061133.4110734-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:4:196::15) 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: 3912b1fb-c19b-40d4-4091-08da75dffd4d X-MS-TrafficTypeDiagnostic: DBBPR04MB7721:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BINWT6avB+B5tSFAEm+nC5ngFtfF0j5DZ5M3jRXYrZ5x98U8s1Tjpn10Ex5X6myJGfgj5j8qu0PUb7ZopcZTX+UTtuXpK7cW25RkWnv2ng2ZPgGy6FF5OizwRGLeHnTn6JsKJWVbkU/bnZGHQJwh81xkD1VfU2HlbB1lnzH41SOI2uQXF8cHFqWO9WBwGsk98jurNX0Ra2NID3A5cFf0zdjo5Z/ngq5B3HnngoJQmQS0WQfmUOObkYXKfaYeOFSDoxgVNjFYas7UzMQm/lre9+8shGot/ACsEx74RX7Qf9f33IZ4jyULPwIv9RNfMhZVyDPOpe6RjUd3fBSp9WLTwvQvrQWAx1qxjIumhjLVgWsHXDqwg/IGd2FUiwqPohy17cUrTQR60V05UNfufkWVJIhzLX4pB91wCPn5SuQiyh+17qgOvvI1L3hsSAkKA8Pfij8LTBh74Itl97QWd+03aZJMpbZfX8mXaYAMYtFyNyJ+HK0fPVnNiHaIABjLVvj8NTGcDidnK8DH9Uv//Q/nlp1e0925ssjdrGpCagkM6OGYBhboAr+2v58Y8EuPXdFmjeNs0RnriT5R0rtQXjKK5EyPE4/aANBwdwXXLoQSRkThAlHVvkhss1D/1PPVUuMnytatXMtmDmgXkXRqeDA34aj9NzswkoT5Y8H1llFJUEQ6XbY2Seniaa5bu+4gruRjzQ+GwEKLNHu1kph8i3oCiW7aEuHxUOZQc1HLBW7lgExgPVJucSZqqpwR7Xgns58D9Xi3SR5sR6ld1mjgsG18/LRQ0ocBvI0DDfsGNW0MygKXY361tMpY4OZ/7wWe6O0QIw6HagvByOonZ1Gj9FJXeozijknE0WguZbMklhMaf2I= 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)(376002)(396003)(366004)(136003)(39860400002)(52116002)(6506007)(41300700001)(2906002)(6666004)(2616005)(26005)(86362001)(6512007)(1076003)(38100700002)(186003)(83380400001)(38350700002)(36756003)(5660300002)(7416002)(66946007)(6486002)(966005)(478600001)(4326008)(66556008)(66476007)(8936002)(8676002)(316002);DIR:OUT;SFP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I090AE5ExJSXS27qLh5/3OSi0yt4TRtpwAgT3/ofIotNzhCzJvrgVstZzyiTZaJDI0/NJaLAayl3BZlYL9OGTHHob8WAtBMBjt1e9YzeEdk66pD3UcvptvuVgWylZpaOqz5wQG0ZdmhoXI0/zctorRpxt+cl6hHI28CatRjA25cjCeuM8rgN0qn83fa5aZ+GMnnMHdMuF9wPiYKqLifBzxqomJFJLffR+dJnYMxfsmQutm7Pg9aw8BgW68HH+fptRbjHsr7N5GadQtQVow1yiQAOir5YkloSgAvFQg05IFx8y7e25cnL/88o05uSTSU3jLMzOd0R+Ypr4ZzvutLJxPPuBaCvOKN6leI4fUBem9rGkEowYjU7CahVdZjdfWQZFMEnTISEtTv3vcLYpPNHdFmBUrQobC8Vmib7MSPcUSMxtq7O6LTZjEG7W/dsESP7SGX+uszHJgFVnzd0ERjMDucYGILgYtTkv7OPvzmt13KbkqZBxe1/uT+brCjElPO2aQfE8jyE83UxZ47ZztFY0iQGp2ntmbBb72pzuS5Tc4onAyvA9q3yCLy2iWlt3dXYz6QGSTVFNY1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3912b1fb-c19b-40d4-4091-08da75dffd4d X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2022 06:10:11.5763 (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: ptahw9Xv3CIibqpRjIsNYbzuF9KbljqH/H5K7Ylmmsv0t/DillUnCjnJTUwKrMy34aa2RlFba2Kh54dGt9CMeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7721 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220803_231014_943557_4A7E6280 X-CRM114-Status: GOOD ( 18.90 ) 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 --- v2->v3: * Add a pattern property to allow child nodes. (Rob) v1->v2: Address Krzysztof's comments: * Add a select to explicitly select the MSI bus dt-binding. * List 'simple-pm-bus' explicitly as one item of compatible strings. * Require compatible and reg properties. * Put reg property just after compatible property in example. .../bus/fsl,imx8qxp-pixel-link-msi-bus.yaml | 108 ++++++++++++++++++ 1 file changed, 108 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..9fc6623a7061 --- /dev/null +++ b/Documentation/devicetree/bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml @@ -0,0 +1,108 @@ +# 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# + +# We need a select here so we don't match all nodes with 'simple-pm-bus'. +select: + properties: + compatible: + contains: + enum: + - fsl,imx8qxp-display-pixel-link-msi-bus + - fsl,imx8qm-display-pixel-link-msi-bus + required: + - compatible + +properties: + compatible: + items: + - enum: + - fsl,imx8qxp-display-pixel-link-msi-bus + - fsl,imx8qm-display-pixel-link-msi-bus + - const: simple-pm-bus + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: master gated clock from system + - description: AHB clock + + clock-names: + items: + - const: msi + - const: ahb + +patternProperties: + "^.*@[0-9a-f]+$": + description: Devices attached to the bus + type: object + properties: + reg: + maxItems: 1 + + required: + - reg + +required: + - compatible + - reg + - clocks + - clock-names + - power-domains + +unevaluatedProperties: false + +examples: + - | + #include + #include + bus@56200000 { + compatible = "fsl,imx8qxp-display-pixel-link-msi-bus", "simple-pm-bus"; + reg = <0x56200000 0x20000>; + #address-cells = <1>; + #size-cells = <1>; + 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>; + };