From patchwork Thu Oct 18 17:25:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10647687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0805E181D for ; Thu, 18 Oct 2018 17:26:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE72D28CD0 for ; Thu, 18 Oct 2018 17:26:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D210E28DCD; Thu, 18 Oct 2018 17:26:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64D6128CD0 for ; Thu, 18 Oct 2018 17:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728150AbeJSB2m (ORCPT ); Thu, 18 Oct 2018 21:28:42 -0400 Received: from mail-eopbgr10080.outbound.protection.outlook.com ([40.107.1.80]:44496 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726444AbeJSB2m (ORCPT ); Thu, 18 Oct 2018 21:28:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HOuqXbMNKwugWkFTV/D4/H/f9GQz6Tdu+HBdHbHI8vY=; b=dhho7jWOUS7p9V/OLTZVqSwvt+OLN9oj0cOq1bEiUjfRriz3tIv6H9dle63K2HdMIcIGsP5f34x9GXLhdt41AG9lE2ViY7Ri3eGBp10RbUX9hNOC3q31qIMC9uYIIqtgRSlQv+35whU9sMJUpfeitmROBwJf9N7Vo3RPf+r42gU= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.126.21) by AM0PR04MB4210.eurprd04.prod.outlook.com (52.134.126.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Thu, 18 Oct 2018 17:25:57 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::25a0:3167:d718:91c1]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::25a0:3167:d718:91c1%3]) with mapi id 15.20.1228.033; Thu, 18 Oct 2018 17:25:57 +0000 From: "A.s. Dong" To: "linux-arm-kernel@lists.infradead.org" CC: "dongas86@gmail.com" , "kernel@pengutronix.de" , "shawnguo@kernel.org" , Fabio Estevam , dl-linux-imx , "rjw@rjwysocki.net" , "ulf.hansson@linaro.org" , "khilman@kernel.org" , "linux-pm@vger.kernel.org" , "A.s. Dong" , Rob Herring , Mark Rutland , "devicetree@vger.kernel.org" Subject: [PATCH V7 1/3] dt-bindings: fsl: scu: make power domain compatible string SoC specific Thread-Topic: [PATCH V7 1/3] dt-bindings: fsl: scu: make power domain compatible string SoC specific Thread-Index: AQHUZwehDfp2M42mOUmvsxtm40diug== Date: Thu, 18 Oct 2018 17:25:57 +0000 Message-ID: <1539883285-7990-2-git-send-email-aisheng.dong@nxp.com> References: <1539883285-7990-1-git-send-email-aisheng.dong@nxp.com> In-Reply-To: <1539883285-7990-1-git-send-email-aisheng.dong@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR01CA0029.apcprd01.prod.exchangelabs.com (2603:1096:203:3e::17) To AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:66::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR04MB4210;6:6VbtTKBZuHZciMTbThUT/DjCXhbme40dUss79QozNOz5oWpODTY35TQ6qnal9zlNqLdjDP90vGM/v3jIp/IfYsF3eOVlUrVQwmtV3sSLQIpJz5Z8+EhYUkc5auQtIm9t+5lfWcQP0IRnVz1rGWTxGquJwR0/kGr9iGkkMlFt2GXaNDn4fIqPuNj8KyR7sxnmdQ9jGAxx1NDor3FPl4nyibovjCOVrabuJrnck8sBT3FDMwa6/hC62weYa3JpTusChyoV0pZUOTARh723TNiFS+HEK1NB40/hveaARRcpGP7QTkMwI+w4Kd5G4AECnQKJvpe3mpMJkJG9qDl8fEGe9rjFQG9IJRiSf55CYYnp6NOxuVMwuGD3k9PxnU2inJpvszQyNjY3pZwtTPP9kic2fifQiH2wp/RX5ptLZRmpjyjp6pC3msXBJL2oCjeaeXCDppsuBKIxG8wikzEUDtcjKg==;5:ohctIyFHjY0Z72qn/iuM1yaMDJ7z702BIhNntLC7CHFM9TuW2i8ayQI+0UP5/BwtZYNLfr0zYIooE2lr5ZNJqghzN7uLFae9XsTAWjzKmArje9Rdudq4+NTKbw+rYSXlS95vIuLHpaDSBKeIHL8AVolEXm/XqYiwiAOgJena3FM=;7:JO6g4u7hAJx7cSnwOwL+4buI1HnTcC4hwkII9TCBuNgVIt35WBdwge56v16FSOsuvjx4RCaxxmIigS4dHI5vAhzkYtemvKZLbj5RHMcfWMP2X78zrbZETxrJ3BVIDDfbBStEmoyTJxLP1GKdi72+mnmFQF0RXhM/kf1znm26a3U6sf2s2Lq+VPT7FKDJHur5fkx76yrkG2bJFqJMHEbsxRSBwkUWTC2lvOFH0+t6nFePRqxTzEsrEPsIdCQFgAbx x-ms-office365-filtering-correlation-id: 9998161d-78a2-40cc-e767-08d6351ec423 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB4210; x-ms-traffictypediagnostic: AM0PR04MB4210: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(269456686620040)(9452136761055)(185117386973197)(180628864354917); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991095);SRVR:AM0PR04MB4210;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB4210; x-forefront-prvs: 08296C9B35 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(136003)(39860400002)(396003)(376002)(346002)(54534003)(189003)(199004)(7736002)(5250100002)(68736007)(256004)(486006)(476003)(186003)(2906002)(508600001)(2616005)(5660300001)(2501003)(66066001)(8936002)(305945005)(2900100001)(14444005)(6916009)(36756003)(6506007)(386003)(50226002)(81166006)(86362001)(81156014)(5640700003)(6436002)(8676002)(575784001)(26005)(4326008)(53936002)(6116002)(54906003)(76176011)(14454004)(3846002)(105586002)(71200400001)(71190400001)(102836004)(7416002)(39060400002)(99286004)(316002)(11346002)(6486002)(446003)(25786009)(2351001)(106356001)(52116002)(97736004)(6512007);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4210;H:AM0PR04MB4211.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: k5BpSZgwLWHhg/yrYGcwfbWzrceuHq744hsjrjWKG8vYU18cQ7ZFTqKCdKAz9KsaVSJ4AaympWOcigDQqjS55hhaKv7PsXV4YtikMs2QYXzR7knL9RHr/CJWYEQ1liMklfdN/PcdM0+8hhwlTHZ2LdnOLSmdqztYQKYpkWtqOMBLk+NCsn3JVwYxITKgdtPl4lerJfoLW28fLqg7hDUZcT6WAgiKbkSGIUIsIw6lhcna24WHhIThNY9NLW8m9Oz4ufQlD5kRRupgCCir9dxaiB+FNEGyxxVp81+49gt50t7Twm7jMzifvZDXIVaIWxUqLLv4YtqCbH9mhW0cTfbBTW6TtUHGmJVwL/0DBcsV7qA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9998161d-78a2-40cc-e767-08d6351ec423 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2018 17:25:57.7953 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4210 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As the power domain API might change in the future for new SoCs, although in a very low possibility, it's still better to make the compatible string more SoC specific to avoid the possible version change for new SoCs. Due to there're still no users in kernel, it's safe to update it without breaking anything. Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Suggested-by: Sascha Hauer Signed-off-by: Dong Aisheng Reviewed-by: Rob Herring --- ChangeLog: v6->v7: * keep "fsl,scu-pd" as fall back compatible string v5->v6: * new patch --- Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt index 46d0af1..e5f3edf 100644 --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt @@ -58,7 +58,9 @@ This binding for the SCU power domain providers uses the generic power domain binding[2]. Required properties: -- compatible: Should be "fsl,scu-pd". +- compatible: Should be one of: + "fsl,imx8qxp-scu-pd" + followed by "fsl,scu-pd" - #address-cells: Should be 1. - #size-cells: Should be 0. @@ -153,7 +155,7 @@ firmware { }; imx8qx-pm { - compatible = "fsl,scu-pd"; + compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd"; #address-cells = <1>; #size-cells = <0>; From patchwork Thu Oct 18 17:26:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10647681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FF2814E2 for ; Thu, 18 Oct 2018 17:26:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E839D28CD0 for ; Thu, 18 Oct 2018 17:26:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAE0A28DF7; Thu, 18 Oct 2018 17:26:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F10EA28CD0 for ; Thu, 18 Oct 2018 17:26:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728325AbeJSB2H (ORCPT ); Thu, 18 Oct 2018 21:28:07 -0400 Received: from mail-eopbgr60074.outbound.protection.outlook.com ([40.107.6.74]:6688 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727859AbeJSB2F (ORCPT ); Thu, 18 Oct 2018 21:28:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1bq2HDHlXUMtVIGlAbWW+7lmqa0jiaIGA6ACBh4bfHY=; b=skhddTmj30rFUH/io85Xbp6s3riK93EQRzQZyQejPCY4QwI5hekTa0SN4TVibQ9Ij+Q61Zid4OOCmqWTUHMqudtW0IPZ50KbmpKKf/WfYMUj+UsE8fYZ/nHKkMEZ+LHGPFCAdVPUzD5SjeNvmdv8N8RqUom26aoCzbvcTjki6Fk= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.126.21) by AM0PR04MB3956.eurprd04.prod.outlook.com (52.134.90.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Thu, 18 Oct 2018 17:26:02 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::25a0:3167:d718:91c1]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::25a0:3167:d718:91c1%3]) with mapi id 15.20.1228.033; Thu, 18 Oct 2018 17:26:02 +0000 From: "A.s. Dong" To: "linux-arm-kernel@lists.infradead.org" CC: "dongas86@gmail.com" , "kernel@pengutronix.de" , "shawnguo@kernel.org" , Fabio Estevam , dl-linux-imx , "rjw@rjwysocki.net" , "ulf.hansson@linaro.org" , "khilman@kernel.org" , "linux-pm@vger.kernel.org" , "A.s. Dong" Subject: [PATCH V7 2/3] firmware: imx: add pm svc headfile Thread-Topic: [PATCH V7 2/3] firmware: imx: add pm svc headfile Thread-Index: AQHUZwekVqkoKFflHkKg49Am9L2n4Q== Date: Thu, 18 Oct 2018 17:26:01 +0000 Message-ID: <1539883285-7990-3-git-send-email-aisheng.dong@nxp.com> References: <1539883285-7990-1-git-send-email-aisheng.dong@nxp.com> In-Reply-To: <1539883285-7990-1-git-send-email-aisheng.dong@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR01CA0029.apcprd01.prod.exchangelabs.com (2603:1096:203:3e::17) To AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:66::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR04MB3956;6:hkQ+b2dAtRb05IhbskOi466w8PeB7j2AWFvK2ZnI1ISgehaROHgkXw4iAd3LdgJQ3DxnrTozrEAlKIziPIT08cUPGAzkXMsVIGYWi8OfoY2illdh7QKzltN6jzF7qdZnnaw6JKpPc7hOkSvGQ1agXmMSlq1F5ep0VemX0xQWDh68IrF+LHv8f/1ChPDbSCcMSY+wDTR4ru8YyAZGcUXWWHw7cYLNUbEfgVVqlqfq3w8yPrC6ak2AFZoGoklrv97zjhQ9fqMCftnPZu7x8uPZUx+J66LR5iZ2Xqg2zFPZ0t+K40DuTZjj04JScZpm4NP25Bn7kDXjCF5ATCZZWIC9+MmJUsgJj7JDCwmd3I6wrqjWKCHanRYAXdlUrLPgagOXJCoQCPQZIVZwzcSZhsV/xb3oifwe8TIZWQDYnnR+Jgrlc2ZCLKwt2zdGNKoZlVrxGutTTpBAW1XWNo4Qe1DAkA==;5:EzcjdBqJvkOGQzCgmXMPMc1/gADzmyQg5Ygc9ZSWX6KWCA5snZHbP94dH+yZq0qyYxOfxsAYIGRdhVVIxcN5VeSBMncHwXNB97i80Pat/FtW0AoQiQ8bG4cUdatR3L93ImxFCgOSacrp927pQh9rhPc3jUDDKpGJs2gAii1esx0=;7:34C0YPFjxFQqqtoYAxNQuzlEYKvXxYOnUZbH9FnzJi/Sx1e0Xf+dZjTwxTDs1S6+CVeA8iwUFIoJ2cjOJctaEXsSowXVpa/iVUEKD51wpfa5DMW8oInf2JedaWJ9vL2/ToYaNzBvvxS1YsTOYCePIkjqgwUe1Ngq9fziVIlw9JDBM4NEBBFgiDiTCSahRV66FZQwfGWfODN9DQYGm+BGcO4+CHcBKvP5Sf6HJJazeuzI6P4wc3luYysInftRI4r0 x-ms-office365-filtering-correlation-id: bbd39e54-9608-4dd7-ae47-08d6351ec6a5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB3956; x-ms-traffictypediagnostic: AM0PR04MB3956: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(269456686620040)(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201708071742011)(7699051)(76991095);SRVR:AM0PR04MB3956;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB3956; x-forefront-prvs: 08296C9B35 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(979002)(39860400002)(136003)(376002)(396003)(366004)(346002)(199004)(189003)(14444005)(2906002)(486006)(186003)(2351001)(76176011)(7736002)(25786009)(81156014)(6916009)(6436002)(305945005)(26005)(8676002)(81166006)(8936002)(106356001)(54906003)(102836004)(99286004)(2501003)(316002)(97736004)(14454004)(508600001)(386003)(52116002)(256004)(6506007)(105586002)(68736007)(5660300001)(71200400001)(71190400001)(5250100002)(86362001)(6116002)(3846002)(66066001)(50226002)(6486002)(5640700003)(2616005)(4326008)(36756003)(476003)(53936002)(2900100001)(6512007)(39060400002)(446003)(11346002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB3956;H:AM0PR04MB4211.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: FPcUCP7XFw2/8DyPltpfjNhqLcD/gCIbK7mn0BXQ5r6pZJJQcD39x98IEXNX6HRYVruVWmUyOF8ebr6Ty1Q6uIwcDj3FxmDXKBJ+JsNKiQV8hJ/xpnaygnf4lu6w60B1vAPhWjzkwyeguU5Jn7AzC+yoFtMNFsv9MQDrL2i2dMYD+tzA8FHyBCEgTDJskjwlJ8Kgrp+aqw2AJzWSBXiLeq6OkwTRmC7djmoLS2+G5nSp9X5ky1uYyb7Jo+E2AbRFVAM1Ajf77j/SL8N3qAecpgvmt+Gz952Vna4F1ymsLl6F15rs2PoZ68JsfcsQ14XZiMexg2ApdrmJDMO1ED6KcI81Rd0TgbZLaKKPOoaPY4E= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbd39e54-9608-4dd7-ae47-08d6351ec6a5 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2018 17:26:02.0213 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB3956 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add SCU PM SVC related protocol definitions which will be used by a number of PM functions like Power Domain, Clock, Reset and etc. The detailed implementation of each function will put in the individual function drivers. Cc: Shawn Guo Cc: Sascha Hauer Signed-off-by: Dong Aisheng --- v3->v4: * update firmware headfile patch from include/soc/imx to include/linux/firmware/imx v2->v3: * name updated with IMX_SC prefix v1->v2: * new introduced --- include/linux/firmware/imx/sci.h | 1 + include/linux/firmware/imx/svc/pm.h | 85 +++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 include/linux/firmware/imx/svc/pm.h diff --git a/include/linux/firmware/imx/sci.h b/include/linux/firmware/imx/sci.h index 29ada60..ebc5509 100644 --- a/include/linux/firmware/imx/sci.h +++ b/include/linux/firmware/imx/sci.h @@ -14,4 +14,5 @@ #include #include +#include #endif /* _SC_SCI_H */ diff --git a/include/linux/firmware/imx/svc/pm.h b/include/linux/firmware/imx/svc/pm.h new file mode 100644 index 0000000..ee5a7bb --- /dev/null +++ b/include/linux/firmware/imx/svc/pm.h @@ -0,0 +1,85 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * Copyright 2017~2018 NXP + * + * Header file containing the public API for the System Controller (SC) + * Power Management (PM) function. This includes functions for power state + * control, clock control, reset control, and wake-up event control. + * + * PM_SVC (SVC) Power Management Service + * + * Module for the Power Management (PM) service. + */ + +#ifndef _SC_PM_API_H +#define _SC_PM_API_H + +#include + +/* + * This type is used to indicate RPC PM function calls. + */ +enum imx_sc_pm_func { + IMX_SC_PM_FUNC_UNKNOWN = 0, + IMX_SC_PM_FUNC_SET_SYS_POWER_MODE = 19, + IMX_SC_PM_FUNC_SET_PARTITION_POWER_MODE = 1, + IMX_SC_PM_FUNC_GET_SYS_POWER_MODE = 2, + IMX_SC_PM_FUNC_SET_RESOURCE_POWER_MODE = 3, + IMX_SC_PM_FUNC_GET_RESOURCE_POWER_MODE = 4, + IMX_SC_PM_FUNC_REQ_LOW_POWER_MODE = 16, + IMX_SC_PM_FUNC_SET_CPU_RESUME_ADDR = 17, + IMX_SC_PM_FUNC_REQ_SYS_IF_POWER_MODE = 18, + IMX_SC_PM_FUNC_SET_CLOCK_RATE = 5, + IMX_SC_PM_FUNC_GET_CLOCK_RATE = 6, + IMX_SC_PM_FUNC_CLOCK_ENABLE = 7, + IMX_SC_PM_FUNC_SET_CLOCK_PARENT = 14, + IMX_SC_PM_FUNC_GET_CLOCK_PARENT = 15, + IMX_SC_PM_FUNC_RESET = 13, + IMX_SC_PM_FUNC_RESET_REASON = 10, + IMX_SC_PM_FUNC_BOOT = 8, + IMX_SC_PM_FUNC_REBOOT = 9, + IMX_SC_PM_FUNC_REBOOT_PARTITION = 12, + IMX_SC_PM_FUNC_CPU_START = 11, +}; + +/* + * Defines for ALL parameters + */ +#define IMX_SC_PM_CLK_ALL UINT8_MAX /* All clocks */ + +/* + * Defines for SC PM Power Mode + */ +#define IMX_SC_PM_PW_MODE_OFF 0 /* Power off */ +#define IMX_SC_PM_PW_MODE_STBY 1 /* Power in standby */ +#define IMX_SC_PM_PW_MODE_LP 2 /* Power in low-power */ +#define IMX_SC_PM_PW_MODE_ON 3 /* Power on */ + +/* + * Defines for SC PM CLK + */ +#define IMX_SC_PM_CLK_SLV_BUS 0 /* Slave bus clock */ +#define IMX_SC_PM_CLK_MST_BUS 1 /* Master bus clock */ +#define IMX_SC_PM_CLK_PER 2 /* Peripheral clock */ +#define IMX_SC_PM_CLK_PHY 3 /* Phy clock */ +#define IMX_SC_PM_CLK_MISC 4 /* Misc clock */ +#define IMX_SC_PM_CLK_MISC0 0 /* Misc 0 clock */ +#define IMX_SC_PM_CLK_MISC1 1 /* Misc 1 clock */ +#define IMX_SC_PM_CLK_MISC2 2 /* Misc 2 clock */ +#define IMX_SC_PM_CLK_MISC3 3 /* Misc 3 clock */ +#define IMX_SC_PM_CLK_MISC4 4 /* Misc 4 clock */ +#define IMX_SC_PM_CLK_CPU 2 /* CPU clock */ +#define IMX_SC_PM_CLK_PLL 4 /* PLL */ +#define IMX_SC_PM_CLK_BYPASS 4 /* Bypass clock */ + +/* + * Defines for SC PM CLK Parent + */ +#define IMX_SC_PM_PARENT_XTAL 0 /* Parent is XTAL. */ +#define IMX_SC_PM_PARENT_PLL0 1 /* Parent is PLL0 */ +#define IMX_SC_PM_PARENT_PLL1 2 /* Parent is PLL1 or PLL0/2 */ +#define IMX_SC_PM_PARENT_PLL2 3 /* Parent in PLL2 or PLL0/4 */ +#define IMX_SC_PM_PARENT_BYPS 4 /* Parent is a bypass clock. */ + +#endif /* _SC_PM_API_H */ From patchwork Thu Oct 18 17:26:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10647683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8999B3B73 for ; Thu, 18 Oct 2018 17:26:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A7CD28CD0 for ; Thu, 18 Oct 2018 17:26:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EBC528DCD; Thu, 18 Oct 2018 17:26:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BE4928CFB for ; Thu, 18 Oct 2018 17:26:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727859AbeJSB2I (ORCPT ); Thu, 18 Oct 2018 21:28:08 -0400 Received: from mail-eopbgr60074.outbound.protection.outlook.com ([40.107.6.74]:6688 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728150AbeJSB2I (ORCPT ); Thu, 18 Oct 2018 21:28:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5hPQWaTOMUFgUoaNrlbWfn+x/0DemwbFl8HhjIV9nbY=; b=ciKOcudzW6zL4zxOYvIzOlakEk6bo5hCKHz8CEeqbApg/1aYPbjtB1o3d/xPKDU+WVvUfs6x0tBqQ8YBz6ELGtq6xvmD16oaURZsxhJsyJheGdwZIPLxetU+eXDzeB7uHC1doKoWBJEW90eDPtVRO/O1rukVUI6a8wtTcq8wWgs= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.126.21) by AM0PR04MB3956.eurprd04.prod.outlook.com (52.134.90.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Thu, 18 Oct 2018 17:26:06 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::25a0:3167:d718:91c1]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::25a0:3167:d718:91c1%3]) with mapi id 15.20.1228.033; Thu, 18 Oct 2018 17:26:06 +0000 From: "A.s. Dong" To: "linux-arm-kernel@lists.infradead.org" CC: "dongas86@gmail.com" , "kernel@pengutronix.de" , "shawnguo@kernel.org" , Fabio Estevam , dl-linux-imx , "rjw@rjwysocki.net" , "ulf.hansson@linaro.org" , "khilman@kernel.org" , "linux-pm@vger.kernel.org" , "A.s. Dong" Subject: [PATCH V7 3/3] firmware: imx: add SCU power domain driver Thread-Topic: [PATCH V7 3/3] firmware: imx: add SCU power domain driver Thread-Index: AQHUZwemYO3WeRLT4UuGVb9JNMDY6w== Date: Thu, 18 Oct 2018 17:26:06 +0000 Message-ID: <1539883285-7990-4-git-send-email-aisheng.dong@nxp.com> References: <1539883285-7990-1-git-send-email-aisheng.dong@nxp.com> In-Reply-To: <1539883285-7990-1-git-send-email-aisheng.dong@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR01CA0029.apcprd01.prod.exchangelabs.com (2603:1096:203:3e::17) To AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:66::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR04MB3956;6:RHuq8ubxctBrKZu3Eg1vcACGXLo01EFX0TUusa6of+GJvkhLX1YGgNfTdJ2Bpe/Jd3asquwb0Cfd+A9oqrFjG36GfLbdq2oZx8Yg0qs/eQ8E/K6s5CwMp9ipOw/MUiREe9cCG17FMDHkn6Ll8uHIR/xnRHSHvVaalA3Mmgv58Jg5USewEM+HIjV4uVILHG33PgRWo03wE6566sUEcxIShgDhbozXYNsR8lHS16B7/QhZ1B2ELEJyU+0sKABVUhDYbkAJDEmWmcTvmIA6IFqXyRN2Q4R03J8xzWECvb6Uly8yZ/u3Lc/N3u2LnvUK7a7xsPDr2WjjPhJylnhiPOPdOqmov91JIftcBbuaWxK+wDPdh+LHecWKuomhnKNEq5vaE0mhnX9a9E1ST+YJvI3A9B+iOD710fkmSkNMCc+KinuGUhl2gmfSt57YOz/FIAL9hIIzt4vGmXZuoaEtJFkgiw==;5:IhOV/KkZfDqHiNMwNyxzXNe17DE9WXdVWsZwPV6te9Euu3QnZ09Jsoae1l9Rg/VYLGG8oDuILuUdmYrJrAUmdxa5w1+s60GZdy0CqLKI0PPbrGMl/Si0rHlebFy0lROiZWPlOAo3piqOQR+ocuR/3VFbTlHFGSmLTPTGF9FfQ0I=;7:XfO94tLDLowOxIEamPklMRsgwv9kD5uPrde/vfBQidAChacnDFkLFdLfQvQMUlqT/wrfrJs9RBNac73d01CLHFYb3LcR6Ap+aeWfM0lt96V8PpvrRxM680oiJ/ESiRAc3xXjQzuMoCtCBpsqjN6F7VLZ88STIN42WD5s4tbceX8PL/JzXm/Jd2tyXJMy2IWkWweir4k1hMq4LMlgOFmj8Sp9ZGpnzeDPxq0F2aCXuoqlKMxq6q8ycJnjJMC/LTi+ x-ms-office365-filtering-correlation-id: 23105239-07c8-4d0b-c520-08d6351ec91c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB3956; x-ms-traffictypediagnostic: AM0PR04MB3956: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(269456686620040)(9452136761055)(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201708071742011)(7699051)(76991095);SRVR:AM0PR04MB3956;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB3956; x-forefront-prvs: 08296C9B35 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(136003)(376002)(396003)(366004)(346002)(199004)(189003)(54534003)(14444005)(2906002)(486006)(186003)(2351001)(76176011)(7736002)(25786009)(81156014)(6916009)(6436002)(305945005)(26005)(8676002)(81166006)(8936002)(106356001)(54906003)(102836004)(99286004)(2501003)(316002)(97736004)(14454004)(508600001)(386003)(52116002)(256004)(6506007)(105586002)(68736007)(5660300001)(71200400001)(71190400001)(5250100002)(86362001)(6116002)(3846002)(66066001)(50226002)(6486002)(5640700003)(2616005)(4326008)(36756003)(476003)(53936002)(2900100001)(6512007)(39060400002)(446003)(11346002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB3956;H:AM0PR04MB4211.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: aXRyWrzqxtwMpYo8VQqNyPwwOfA86nl24MjaHPuM72LV8T4pJ7BTv7LFWfrEQKZfQy1AOPkH47N/7263zshoHG/8MqXoDAgV06N5BEKWSCe1msf2B6zYn/xkPHehlPygAsFeNJPAsBznmsh3mwHVPaGMGlJz3Uv56bMvW9ZuJK8Pj2N/U7sAnmiMH6d16+jTB9anzFrqUpYdes+8Hk3RTt1KEuvENAl2HKQMpna1VXRWdwTWr7DNbQggjIQ/XELBeqKo7FP0WGD1ACx38ZAe7EDWnWviDZeVpll3Z3NXMzRI+ZkIgutAV2cmI/LgB5IwRC39CCGw6NL4BNej2pn9dommRDqKxkv7FxGM4WesmTo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23105239-07c8-4d0b-c520-08d6351ec91c X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2018 17:26:06.2353 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB3956 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some i.MX SoCs contain a system controller that is responsible for controlling the state of the IPs that are present. Communication between the host processor running an OS and the system controller happens through a SCU protocol. This patch adds SCU protocol based power domains drivers. Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: "Rafael J. Wysocki" Cc: Kevin Hilman Cc: linux-pm@vger.kernel.org Reviewed-by: Ulf Hansson Signed-off-by: Dong Aisheng --- ChangeLog: v6->v7: * still using generic "fsl,scu-pd" to driver binding incase the future SoC is compatible * remove unnecessary cast v5->v6: * only compatible string name updated from fsl,scu-pd to fsl,imx8qxp-scu-pd accordingly v4->v5: * minor improvements according to Sascha's suggestions v3->v4: * update firmware headfile patch from include/soc/imx to include/linux/firmware/imx v2->v3: * name of structures/enums updated with imx_sc prefix v1->v2: * move into drivers/firmware/imx * Implement sc_pm_set_resource_power_mode() API in the driver instead of call it via SCU API according to Sascha's suggestion --- drivers/firmware/imx/Kconfig | 6 ++ drivers/firmware/imx/Makefile | 3 +- drivers/firmware/imx/scu-pd.c | 164 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 drivers/firmware/imx/scu-pd.c diff --git a/drivers/firmware/imx/Kconfig b/drivers/firmware/imx/Kconfig index b170c28..6a7a7c2 100644 --- a/drivers/firmware/imx/Kconfig +++ b/drivers/firmware/imx/Kconfig @@ -9,3 +9,9 @@ config IMX_SCU This driver manages the IPC interface between host CPU and the SCU firmware running on M4. + +config IMX_SCU_PD + bool "IMX SCU Power Domain driver" + depends on IMX_SCU + help + The System Controller Firmware (SCFW) based power domain driver. diff --git a/drivers/firmware/imx/Makefile b/drivers/firmware/imx/Makefile index 0ac04df..1b2e15b 100644 --- a/drivers/firmware/imx/Makefile +++ b/drivers/firmware/imx/Makefile @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o +obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o +obj-$(CONFIG_IMX_SCU_PD) += scu-pd.o diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c new file mode 100644 index 0000000..13478cd --- /dev/null +++ b/drivers/firmware/imx/scu-pd.c @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * Copyright 2017~2018 NXP + * Dong Aisheng + * + * Implementation of the SCU based Power Domains + */ + +#define pr_fmt(fmt) "scu_pd: " fmt + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct imx_sc_pm_domain { + struct generic_pm_domain pd; + u32 rsrc_id; +}; + +static struct imx_sc_ipc *pm_ipc_handle; + +/* SCU Power Mode Protocol definition */ +struct imx_sc_msg_req_set_resource_power_mode { + struct imx_sc_rpc_msg hdr; + u16 resource; + u8 mode; +} __packed; + +static int imx_sc_pd_power(struct generic_pm_domain *domain, bool power_on) +{ + struct imx_sc_msg_req_set_resource_power_mode msg; + struct imx_sc_rpc_msg *hdr = &msg.hdr; + struct imx_sc_pm_domain *pd; + int ret; + + pd = container_of(domain, struct imx_sc_pm_domain, pd); + + hdr->ver = IMX_SC_RPC_VERSION; + hdr->svc = IMX_SC_RPC_SVC_PM; + hdr->func = IMX_SC_PM_FUNC_SET_RESOURCE_POWER_MODE; + hdr->size = 2; + + msg.resource = pd->rsrc_id; + msg.mode = power_on ? IMX_SC_PM_PW_MODE_ON : IMX_SC_PM_PW_MODE_LP; + + ret = imx_scu_call_rpc(pm_ipc_handle, &msg, true); + if (ret) + pr_err("failed to power %s resource %d ret %d\n", + power_on ? "up" : "off", pd->rsrc_id, ret); + + return ret; +} + +static int imx_sc_pd_power_on(struct generic_pm_domain *domain) +{ + return imx_sc_pd_power(domain, true); +} + +static int imx_sc_pd_power_off(struct generic_pm_domain *domain) +{ + return imx_sc_pd_power(domain, false); +} + +static struct generic_pm_domain *imx_sc_pm_add_one_domain( + struct device_node *np, + struct generic_pm_domain *genpd_parent) +{ + struct imx_sc_pm_domain *imx_sc_pd; + u32 rsrc_id; + int ret; + + imx_sc_pd = kzalloc(sizeof(*imx_sc_pd), GFP_KERNEL); + if (!imx_sc_pd) + return ERR_PTR(-ENOMEM); + + if (!of_property_read_u32(np, "reg", &rsrc_id)) { + if (rsrc_id >= IMX_SC_R_LAST) { + pr_warn("%pOF: invalid rsrc id %d found", np, rsrc_id); + ret = -EINVAL; + goto err; + } + imx_sc_pd->rsrc_id = rsrc_id; + imx_sc_pd->pd.power_off = imx_sc_pd_power_off; + imx_sc_pd->pd.power_on = imx_sc_pd_power_on; + } else { + imx_sc_pd->rsrc_id = IMX_SC_R_LAST; + } + + imx_sc_pd->pd.name = np->name; + + ret = pm_genpd_init(&imx_sc_pd->pd, NULL, true); + if (ret < 0) + goto err; + + if (genpd_parent) { + ret = pm_genpd_add_subdomain(genpd_parent, &imx_sc_pd->pd); + if (ret) + goto err; + } + + ret = of_genpd_add_provider_simple(np, &imx_sc_pd->pd); + if (!ret) + return &imx_sc_pd->pd; + + pm_genpd_remove_subdomain(genpd_parent, &imx_sc_pd->pd); + +err: + pr_warn("failed to add PM domain %pOF: %d\n", np, ret); + kfree(imx_sc_pd); + return ERR_PTR(ret); +} + +static void imx_sc_pm_add_pm_domains(struct device_node *parent, + struct generic_pm_domain *genpd_parent) +{ + struct generic_pm_domain *pd; + struct device_node *np; + + for_each_child_of_node(parent, np) { + pd = imx_sc_pm_add_one_domain(np, genpd_parent); + if (!IS_ERR(pd)) + imx_sc_pm_add_pm_domains(np, pd); + } +} + +static int imx_sc_pd_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + int ret; + + ret = imx_scu_get_handle(&pm_ipc_handle); + if (ret) + return ret; + + imx_sc_pm_add_pm_domains(np, NULL); + + return 0; +} + +static const struct of_device_id imx_sc_pd_match[] = { + { .compatible = "fsl,scu-pd", }, + { /* sentinel */ } +}; + +static struct platform_driver imx_sc_pd_driver = { + .driver = { + .name = "imx-scu-pd", + .of_match_table = imx_sc_pd_match, + }, + .probe = imx_sc_pd_probe, +}; +builtin_platform_driver(imx_sc_pd_driver); + +MODULE_AUTHOR("Dong Aisheng "); +MODULE_DESCRIPTION("IMX SCU Power Domain driver"); +MODULE_LICENSE("GPL v2");