From patchwork Mon Apr 13 06:49:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11485109 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6DC5913 for ; Mon, 13 Apr 2020 06:57:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BFA9520735 for ; Mon, 13 Apr 2020 06:57:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hhea7f9w"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="hviTTqyH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFA9520735 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CxG6Ggwsn2IMDUZm8CAg07j5+b1UUBMEsbu0ZdjGwPM=; b=hhea7f9w/hXqbk DsxmVza9YeG3EKCba5Km3MpjeU07aNZyay5mcw5kkAb6ECGlw092Q8DAriZ4qK4YID8FFOMdF/idr 9eWbGGQHyJpt0Ep8jEHdsFHS2+MakIQZkc+YaMRmyY8bFPA9OxBSJboyMzSdr1xn5uuyzZaDNqlJb wE4ELXYTcDwqir8xu+SZaHluyzgQof7pdO+aRZf43eC81YEJ65s1/YRWjxq0GexxMPQQPshI+lmUP 3ebAQpnMy71phYm4i9VuE9BlYBmmLIdRlrwZk2OrAMU1Cn5ScizjkRELSyfrzyUYXr4dHi7gs9hwF RxELGZj7V5utl2CZvr/Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNt2H-00065m-5D; Mon, 13 Apr 2020 06:57:37 +0000 Received: from mail-eopbgr40064.outbound.protection.outlook.com ([40.107.4.64] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNt26-0005wO-7P for linux-arm-kernel@lists.infradead.org; Mon, 13 Apr 2020 06:57:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CnmcmVa7G7mKIPNiPkHD3I3ZwsGkVsg65TNiQTJ8r1gP60/oik0tKD32L0oTImcFuWCppZdt5kzU+mpLFxVmzatTyTGb7HpII9id0oxKbLgyJ5OWxlmGIiebBQdT5ys//Jg3IP6tAUnX8rmJQSUIErWZPxbL5EwikaFqlfFJ/jm/OBUCZgUNoX2lwVIQeD3WOB+7SA8JZw1jQPFPZ2ywbTcDqS71Y2Jr+XDo4WJPU/dJ31QRkJ7Rh4svA2yrVSC3Bza6ZiRTwtWHUtKjbXH1weiPnwJPFMLPOw6+FJx+jx19boC5TVm+O8Li8mLDGtK80LUfdaiPdvRHoQEKZNqnmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GOUvGQcFCI4VGVxKBmKJxz9nyt4dSetVyRYay1YvnBY=; b=NBksdiAypMHxvko+nAYZ4ON4UPX3NEEaPya3EZ1ZH/ERqTK+7C9px7gmfY+3phN+4DbqwtKeskRaaFUDQyQtT3mtO2O9zwOMt5G2z0DjE/1xA6VQVHREOZUb68u6wK2ZIkBS4UERtWV8mHNo9kEIEYyViW5dcS5nAmU7x+Jo6x7ngNUVYEu2AURpe6XW5/BuHP7oDL2lROPMBEjs8iIRN8uPmntw05kXqH50ylBeyRhukN2mQ8+mlhz1OO6vdhjY4eQwsC/PrVZzE+E4Arol5IbsrT98vgLeqo81UXrfkm3D0e4BVVMfzP21VO4mpoyeMLdCKAtU953ciRiOLaO4fg== 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=GOUvGQcFCI4VGVxKBmKJxz9nyt4dSetVyRYay1YvnBY=; b=hviTTqyH76Cdi/m7fno6QUTb6qkjCT+aKtaPPIKfu+xnGPls3f1YV19bwmim5UjdsukVt47bq78UE9IO2FzGxvqzrmdZpm4ot4b+aJ8aekfxJHbC89ARqq91axGadna4p95fUN1wHTF9AQt45QCgemuJwnW7Mii/P6gDonb6Dvo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) by AM0PR04MB4564.eurprd04.prod.outlook.com (2603:10a6:208:74::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Mon, 13 Apr 2020 06:57:21 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::ad44:6b0d:205d:f8fc]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::ad44:6b0d:205d:f8fc%7]) with mapi id 15.20.2900.026; Mon, 13 Apr 2020 06:57:21 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, sboyd@kernel.org, robh+dt@kernel.org Subject: [PATCH V2 1/4] dt-bindings: fsl: add i.MX7ULP PMC binding doc Date: Mon, 13 Apr 2020 14:49:05 +0800 Message-Id: <1586760548-23046-2-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586760548-23046-1-git-send-email-peng.fan@nxp.com> References: <1586760548-23046-1-git-send-email-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR06CA0143.apcprd06.prod.outlook.com (2603:1096:1:1f::21) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR06CA0143.apcprd06.prod.outlook.com (2603:1096:1:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2900.15 via Frontend Transport; Mon, 13 Apr 2020 06:57:17 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 48266a4f-3604-4685-7117-08d7df77e9ca X-MS-TrafficTypeDiagnostic: AM0PR04MB4564:|AM0PR04MB4564: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:243; X-Forefront-PRVS: 037291602B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4481.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(39860400002)(366004)(376002)(136003)(346002)(4326008)(86362001)(8936002)(478600001)(9686003)(316002)(16526019)(26005)(6512007)(6506007)(6666004)(52116002)(186003)(966005)(8676002)(81156014)(6486002)(69590400007)(66476007)(66556008)(2616005)(956004)(36756003)(5660300002)(66946007)(2906002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NyefpIUYoddu9GW/Mra/DWfM+MvaXdICCzvmjLfDXZ5C5L3l166w4mYF8rHyLyGgEzCj8vIKdzPAjFsoHEnNMstdfJ80aQCe5rQ7hKUK/CgdNrjfSGiu2wTPXbPi0J6KDRe0nkDR3bFjDnecQa52k7SvIjs7UzkCzPhSmmH1fK/ATQBikxu6gmEzNpajxBX2mq5K8+oDfvLjQxqBI6Q2PvqJgfZ2ugB41OY+jSB9pSdYoNyWTS3DODNsQePc9hebtmWgHwormhy22c+Z1URhRIy0DK5/gKBIwE5iMCKRs+TGT8H4EgHqoy0LeQjf4CV146c+vDw5I/lnYObYdoQeMJD8uqlDW+AHiEe6MZqkoHuQ49YUHbemqdp64U+nyx36DZqIqdPGZsr59+Bg2ObLF6dKdZBsfBO1bGJSFi2snRuPV55PH2+HAEwz4Wk1ivnkpa9rQr6Qm33AgNQuNyNJ9SN4TaRanPq4ey7qUzjuTQgPONQJCVeGmpbNwsHvaNmljE4e4/pe+sTLIJBCTFql4GtnR4T0YJRU5RbJYi+b8D+ROFxTCFiXO5+1MXd4vlUR0U3VAW4C/nKjA6t5GiHICw== X-MS-Exchange-AntiSpam-MessageData: CfpCet6f6GmSYxgYMJCArhswNh1RqI8O6wQX0Kiov13HQejz/o5NxkXeSfMtey+QUQ82VfCurGViZoL2X619l2j2zMX3BxKHgeNeV2FUoR8gVnxsPaj2O6rlNfoc0dKC3J0Bj1DAunCPylLuRnUwnQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48266a4f-3604-4685-7117-08d7df77e9ca X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2020 06:57:21.4784 (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: wb7bmo47i20WGN5MnsJgNLMAlDq4gv3gd2R7N6RN1Wizh9imETT+dpqSzC2hh6MNkWd/uKiJFLFWl1wKo+XcIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4564 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200412_235726_266619_473F8721 X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.4.64 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , abel.vesa@nxp.com, Anson.Huang@nxp.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Peng Fan Add i.MX7ULP Power Management Controller binding doc pmc0 is used by M4, pmc1 is used by A7, they have different register name and usage. Signed-off-by: Peng Fan --- V2: Fix dt_bindings_check .../bindings/arm/freescale/imx7ulp_pmc.yaml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/freescale/imx7ulp_pmc.yaml diff --git a/Documentation/devicetree/bindings/arm/freescale/imx7ulp_pmc.yaml b/Documentation/devicetree/bindings/arm/freescale/imx7ulp_pmc.yaml new file mode 100644 index 000000000000..c60903039718 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/freescale/imx7ulp_pmc.yaml @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/freescale/imx7ulp_pmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: i.MX7ULP Power Management Controller(PMC) Device Tree Bindings + +maintainers: + - Peng Fan + +properties: + compatible: + items: + - enum: + - fsl,imx7ulp-pmc0 + - fsl,imx7ulp-pmc1 + + reg: + maxItems: 1 + +required: + - compatible + - reg + +examples: + - | + pmc0: pmc0@410a1000 { + compatible = "fsl,imx7ulp-pmc0"; + reg = <0x410a1000 0x1000>; + }; +... From patchwork Mon Apr 13 06:49:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11485113 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE274174A for ; Mon, 13 Apr 2020 06:57:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BC55920735 for ; Mon, 13 Apr 2020 06:57:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HjKLS8IX"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="RyZzeDuD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC55920735 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oPtRSlzVePC4mKtEugCZMPORsp0PC9RhJsx2dNKaf4E=; b=HjKLS8IXlrvasN EOcETKf93tarsCHju0j5MNDuwie4hPLyxvt1GJO0jTtLk7IJ/e0vjkD6iQW/y3vElAQt9hvCuSdnJ Pzmk8FwBByvqRkEn817wcnA0Gs7Io9cDUOG/Znv3o0AQV56+5qvPtaPZVOV9lE/c/8HGWi4j14wfD ia1TNB92osIYyRjWF8lQ0QSLYrmmkC7GcRSLZUVzzD2C7RfAW8M2wjlDczkey/uqclq+x2B+KTz7d mFanawtjWs5/Q467pWbKqre2VdgFYrqIgnfr+9o2sAEusEH+UlNbmup/0sqgBNswryPs+2DTe58nd MRCvqpyTjqLT5yz8fFsw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNt2X-0006Mm-NZ; Mon, 13 Apr 2020 06:57:53 +0000 Received: from mail-eopbgr40064.outbound.protection.outlook.com ([40.107.4.64] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNt28-0005wO-2k for linux-arm-kernel@lists.infradead.org; Mon, 13 Apr 2020 06:57:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FyDFea9EoQ8NYlo5rvbj4tTSRbaNpRoSvFymDL/4CQ7pDoFfN0z0YCDKaTmV0I9VLV6bzqTY9ZERStcF6fGIw2wLhAqgvyzOEK9ykK0WpsxVLpwj/umebhJ9/E/5b0q2QAvwzVA5XWOgzc2JidIUnNlfnXzTUHGhcm+q86u98rY03ywoCP9gMKFSJYVg+ozF8h+7AjAtLuNbX1U2bo7F2yY7Mrw2QvXsWIAu2RPjQsAtC2o6/LC8NjvPyUoFDaMX25QSgzDuCxYr3pFHN+BfbARrD+9zFgxv9EgKI+P/6hv+3D0BNvAhF5tHlXzM1zIa2dMuAZq4x0h2eJ2orDObPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CJtwwi9R8AkYKYGMATprxuv8FqEL0gqBmcz9s4hqO1k=; b=NloUC4f9whDFHhLpw9M+oDj2Xvo7LMx+N0OROE+iztTtKva0tv0cIMj4LLm3E5BUT+pTc08k4z362WXNa+RjcabOopvuzmxa7uE4QgI9Nfm8WJv4ZO7w2s9i+AXpVTAT5cOhmlxq8j16oQDmhIhaoi/ekD0i49eIKPp4Qbfza0n105NEppKQHnCnqoV3DrWkm6g2xMas7/8V3pIwpqV8WLubFKX9M3J3OBd7/zH0zIgtJYrBTCpEniW+HlxumCuEENYPfkKxU6SolAGoKv9ZxiaVXi6W/PQOETcHehhhuTBCEPrk6ZEzbqQOzbtGKkSbjEUQMjXl3Z09/Sl5eXEUwQ== 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=CJtwwi9R8AkYKYGMATprxuv8FqEL0gqBmcz9s4hqO1k=; b=RyZzeDuD6zKXe5EybzLxDd51gEMcWrIcJWtxQMOW962OfAz7Jfjlp8ZXWi6+YGCvJvugFoz3Db2bwxVkKqhgYcs7PfNnKwTUUJJ1++nSvo+PMPkzZIiuqJBa/pUYdKL2CoJl2NV/Z5gsvHmCNVQEcneSRzbPIvuR7UMMl85A2eQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) by AM0PR04MB4564.eurprd04.prod.outlook.com (2603:10a6:208:74::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Mon, 13 Apr 2020 06:57:25 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::ad44:6b0d:205d:f8fc]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::ad44:6b0d:205d:f8fc%7]) with mapi id 15.20.2900.026; Mon, 13 Apr 2020 06:57:25 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, sboyd@kernel.org, robh+dt@kernel.org Subject: [PATCH V2 2/4] ARM: dts: imx7ulp: add pmc node Date: Mon, 13 Apr 2020 14:49:06 +0800 Message-Id: <1586760548-23046-3-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586760548-23046-1-git-send-email-peng.fan@nxp.com> References: <1586760548-23046-1-git-send-email-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR06CA0143.apcprd06.prod.outlook.com (2603:1096:1:1f::21) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR06CA0143.apcprd06.prod.outlook.com (2603:1096:1:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2900.15 via Frontend Transport; Mon, 13 Apr 2020 06:57:21 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0e615546-2713-44b4-d3ea-08d7df77ec2b X-MS-TrafficTypeDiagnostic: AM0PR04MB4564:|AM0PR04MB4564: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:243; X-Forefront-PRVS: 037291602B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4481.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(39860400002)(366004)(376002)(136003)(346002)(4326008)(86362001)(8936002)(478600001)(9686003)(316002)(16526019)(26005)(6512007)(6506007)(6666004)(52116002)(186003)(4744005)(8676002)(81156014)(6486002)(69590400007)(66476007)(66556008)(2616005)(956004)(36756003)(5660300002)(66946007)(2906002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +umwrqagFyXlytNl7OhCXgM0B3y4U8ICVbuCFonB6NK+3u0386EO/gQOQ89hgNBqMhmKVQo83jfHsvtmYhqOKo0W6C+FkTS88taq4sAvY83MQ0XHNuVtHS7wpOf0H0Zz//43oXK2ISgZRyuGO/ox6RTdVwqBLES08771MjWWC8bQni7Gtppcx3XXa7Rmki/7L7MUu7++Owa8OofNqPN8U9mZTuM81n542+jJfSfxg1qHTRCGYS6GFaGIUU5UhveS0ROA0JJTt2BzP/DbNxj8HTwJQOw0Ud9L8Z8ZFpoYjofpP0oHAeyqLVSKoOtMEQUSGcg1u6D/BXyxijHIwQkValIYPkHRNVT1ZTc/IPQ3Cfv/45EAG9fH+kMm3xWNudf0a8VORXZaTiYQx7B9X1TurK164nmX2Q0O/fd01yf+JOU3wAfa/RL3Oavp558st0bHvn+vx0/3ajYqpFdnDv4e58lAdrnQ5wevYurjzLHtt7R+Q9nDKeYB+zMda6k46EbC X-MS-Exchange-AntiSpam-MessageData: VGEV5e2PBDY+bAzLhkYoqGUMn6WiGZuR8iXAQQPe7lD55UaGD+N118GPulzKdWhcT9RqEN36GfjnQ/3SVf6etAqhy++ty5Y5ZuNbAM9nO+M4+IONv4mWFmhOnq1II39sclW6Cfd8smV123Rz2o+HAg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e615546-2713-44b4-d3ea-08d7df77ec2b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2020 06:57:25.5830 (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: HsbSVvIGfmXM1BrjY3DvNUFq0nmiw1oVDno9M+VYTEVQmvq65Tucgp+wx6fXUlCAK347WY0S3vY6nT2LLyw6Jg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4564 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200412_235728_122836_B7DB5D23 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.4.64 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , abel.vesa@nxp.com, Anson.Huang@nxp.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Peng Fan Add i.MX7ULP pmc0/1 node Signed-off-by: Peng Fan --- V2: None arch/arm/boot/dts/imx7ulp.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot/dts/imx7ulp.dtsi index f7c4878534c8..bc9d692c0530 100644 --- a/arch/arm/boot/dts/imx7ulp.dtsi +++ b/arch/arm/boot/dts/imx7ulp.dtsi @@ -286,6 +286,11 @@ assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>; }; + pmc1: pmc1@40400000 { + compatible = "fsl,imx7ulp-pmc1"; + reg = <0x40400000 0x1000>; + }; + smc1: clock-controller@40410000 { compatible = "fsl,imx7ulp-smc1"; reg = <0x40410000 0x1000>; @@ -447,6 +452,11 @@ reg = <0x41080000 0x80000>; ranges; + pmc0: pmc0@410a1000 { + compatible = "fsl,imx7ulp-pmc0"; + reg = <0x410a1000 0x1000>; + }; + sim: sim@410a3000 { compatible = "fsl,imx7ulp-sim", "syscon"; reg = <0x410a3000 0x1000>; From patchwork Mon Apr 13 06:49:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11485115 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE110913 for ; Mon, 13 Apr 2020 06:58:13 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9B66520735 for ; Mon, 13 Apr 2020 06:58:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jiHAMKRP"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="n9AxKYHK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B66520735 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H2+cMLkOyCCiMBTevClC6pLWmZdrc/vReIxJcbc9qZo=; b=jiHAMKRPsuWaVf xfEyC3NQMT1q4H64hMYL520Q3yL7wAUzzKd2FtLsDgNKVieQODE1iGI00BO+0ZovvsNXms/0HnnSR fyIHaEbEPGPqAFEYrWScx92MSNSZLXHpOLJZmvnwlKFuqPrFnu05QgfKb2fq+5I31qRKlkUnbTQy1 wBOxMPi5k+PndXrsx+G7L5gkehiZSHxt8ZH09j+t622PczJTL0GGK45JoV9lkzo5zaPKdk0ggXVsl +0ZwSHp8llA44HbBQusYWDjdtICkyAMAYBQdNY+K72EuPvTGMB0WY7l/9pCFXCXKKJB+FG0AQ5yEk LTOgbnCdBUwF6IDxGdTg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNt2o-0006bb-IK; Mon, 13 Apr 2020 06:58:10 +0000 Received: from mail-eopbgr40086.outbound.protection.outlook.com ([40.107.4.86] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNt2D-0005zA-FB for linux-arm-kernel@lists.infradead.org; Mon, 13 Apr 2020 06:57:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AaJmxwakooLUfKRReKXajVek4WM2Kd8e0TAihUcXr2O0DoPJwM4fd+tRN4o4QQSG8wINLxLNhzs1UEU+w+wi+S66LBKOlz/KC6zwet8u0YXw1CzD4B6h9yUx/q5uX8iqSBFv2W1wjUT+HotPCL+8XFY9CNPc9/OJN1X8MHsmlCkZSf2iVlA98BkcRSobACvfZVuAtN6JLciOErLqlJp6mDEpPi8WaABzJlRUmgc0JncT32e8nnFrbbnt4CA/+5DtrqOxjL/fUmoTPTYP4l9DiQQVb7zt1MCkb2nUqQVnEI6YPL5uVkmDapjPtf76hQ6JK6wsXcODzGBck0p5liM4Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=80QGD5YNpszAHtt5BhayU2MGMa+5+rTJjZ5tMrlTnc8=; b=oLDf6RnKUm4KKT7oMuBRR579QWPcYeyMsowkF+kk8nV9XCJjjy0yB0vQ8PHiKii/0QFrya3CZQMu3QGaLLRR9YK+wkZqri6SgBvxr6/lOeupNLBMYwUxYu7Xo1lO6XwoEEQ6NJ1/Lp+Zn5TRUO9vP4N1az8s/HcdcFPWPJiivmKZ3ZW6fd/7qIZLs2vsCZEhn4z4QiUP5liWrNUJUjAFXujOwxIwvScZLhrszudHxbIV55TvmX0EMbdoA6UbQX59xy6a1z7XumByB6V0+SaLW8gRQGoAzoM7rNJMpzVoKyxusfUG7KfJe5a+Yz32WztaFuqpjrokwYRY5e3wFIC0nA== 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=80QGD5YNpszAHtt5BhayU2MGMa+5+rTJjZ5tMrlTnc8=; b=n9AxKYHKHtZeW9siGEVpC33MLy4qWSFByH2ONHo5KZAtqNe0nISZXq4G4huoKL5gEoi+NSaOChIeyJKPWQsN/pgPsx6maQwlI3YIBwr9+bl2RvkLK2SMSfdbUkGTg8ni9eFnCD4haPfIw8aQLT4hmuKGxzc2+/43tXPvF2Qd/88= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) by AM0PR04MB4564.eurprd04.prod.outlook.com (2603:10a6:208:74::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Mon, 13 Apr 2020 06:57:30 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::ad44:6b0d:205d:f8fc]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::ad44:6b0d:205d:f8fc%7]) with mapi id 15.20.2900.026; Mon, 13 Apr 2020 06:57:30 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, sboyd@kernel.org, robh+dt@kernel.org Subject: [PATCH V2 3/4] ARM: imx: imx7ulp: support HSRUN mode Date: Mon, 13 Apr 2020 14:49:07 +0800 Message-Id: <1586760548-23046-4-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586760548-23046-1-git-send-email-peng.fan@nxp.com> References: <1586760548-23046-1-git-send-email-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR06CA0143.apcprd06.prod.outlook.com (2603:1096:1:1f::21) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR06CA0143.apcprd06.prod.outlook.com (2603:1096:1:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2900.15 via Frontend Transport; Mon, 13 Apr 2020 06:57:25 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d78820cc-0e70-44bb-d4af-08d7df77eeec X-MS-TrafficTypeDiagnostic: AM0PR04MB4564:|AM0PR04MB4564: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1265; X-Forefront-PRVS: 037291602B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4481.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(39860400002)(366004)(376002)(136003)(346002)(4326008)(86362001)(8936002)(478600001)(9686003)(316002)(16526019)(26005)(6512007)(6506007)(6666004)(52116002)(186003)(8676002)(81156014)(6486002)(69590400007)(66476007)(66556008)(2616005)(956004)(36756003)(5660300002)(66946007)(2906002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HAZ2jJer+Q/6ySIpMCsBmNoHTe8GZnOfXod70HU1W8tsfG3Uku2187TGIkbnbALgfqQyAmt/diUTLyNymF/25eZw3uPkiM6N6G6lr6nXCRotsSjR+gAttlt8KTCKJYM4cBvr1NeHuLRKOtn2vMfqwMZLLQh9GX0mRi0EunF1Tvi4C64L65JnhxvoQWRq66LVR+PANjZY5NiZP3rfDuMkXeK0kBIw2b7JEoRw6Chc9ZzV4LvuCX/pu1dhr01uhRsvzYAMgnXqXWzH+yzNDVrcxAW+gzEtbU86EVt7IuC+ucPzrs/eirbOs9zGXMzUCLW+5JgOhDo8Gr2R00cnha7XOKecuiDXg8uzcBZQDr2qZvGkSzOOVm8W/nfjyLnJVcSIB/FjXtuFqdXvL+uhogOEgO5KwOethblvrlEFucGTFTyrUL5zn3xlv9eZN3prXaLJUgKDY05Fz23tBG4raFMZeUZ7CR/rEKm0auRvuaotgeMJwpEkCttsuMMmpSsNacon X-MS-Exchange-AntiSpam-MessageData: NQvOYsyFhttDA2g7JG0QX+/G5a9zvnqn05zwDFfTNNK0YnPVX35cyC83h8ZnWptZ5VfN5mSSYDdZI58RKuvXSkyNhmNeb1+SCYN8FrX2pWFheGFT8p9mieoV39A2B04qI7B8QpCt+MiJDpzS7tA9aA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d78820cc-0e70-44bb-d4af-08d7df77eeec X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2020 06:57:30.0953 (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: 3L/82YeEMhAX4/1kdS+mTn65hbXzNSKQsFXe9q144ZneIus0MZjY2f9Y7HmkKeBHzLIZGCC4Ba0bSLRoKHc1yQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4564 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200412_235733_530778_9153745B X-CRM114-Status: UNSURE ( 9.22 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.4.86 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , abel.vesa@nxp.com, Anson.Huang@nxp.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Peng Fan Configure PMPROT to let ARM core could run into HSRUN mode. In LDO-enabled mode, HSRUN mode is not allowed, so add a check before configure PMPROT. Signed-off-by: Peng Fan --- V2: None arch/arm/mach-imx/pm-imx7ulp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/mach-imx/pm-imx7ulp.c b/arch/arm/mach-imx/pm-imx7ulp.c index 2e756d8191fa..393faf1e8382 100644 --- a/arch/arm/mach-imx/pm-imx7ulp.c +++ b/arch/arm/mach-imx/pm-imx7ulp.c @@ -11,6 +11,10 @@ #include "common.h" +#define PMC0_CTRL 0x28 +#define BM_CTRL_LDOEN BIT(31) + +#define SMC_PMPROT 0x8 #define SMC_PMCTRL 0x10 #define BP_PMCTRL_PSTOPO 16 #define PSTOPO_PSTOP3 0x3 @@ -25,7 +29,10 @@ #define BM_PMCTRL_RUNM (3 << BP_PMCTRL_RUNM) #define BM_PMCTRL_STOPM (7 << BP_PMCTRL_STOPM) +#define BM_PMPROT_AHSRUN BIT(7) + static void __iomem *smc1_base; +static void __iomem *pmc0_base; int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode) { @@ -65,5 +72,13 @@ void __init imx7ulp_pm_init(void) of_node_put(np); WARN_ON(!smc1_base); + np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-pmc0"); + pmc0_base = of_iomap(np, 0); + WARN_ON(!pmc0_base); + of_node_put(np); + + if (!(readl_relaxed(pmc0_base + PMC0_CTRL) & BM_CTRL_LDOEN)) + writel_relaxed(BM_PMPROT_AHSRUN, smc1_base + SMC_PMPROT); + imx7ulp_set_lpm(ULP_PM_RUN); } From patchwork Mon Apr 13 06:49:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11485117 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 875A1174A for ; Mon, 13 Apr 2020 06:58:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 649792076B for ; Mon, 13 Apr 2020 06:58:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o9pXW6wX"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="qGb06RJy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 649792076B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Qa0DvwmlGWKtLZnXh5uRWdzFQKma8HQuIl95KYbFS3o=; b=o9pXW6wXch0qEv djyRhjGKabNCfcEBF34pmc1ilVwQAiFkFdxODbADwJZgTI02i5QzG+OYfitcZhwvH9bQkN5Y1Kdst jJFBDXsf+N3x8nAASStRg00GXN4r9jjLlCzxYFfPOJ5Upv1m3WOfLotsykdacefQODpTT+qdpDg2q yHlx084yHCmS9sLxoBd06EqUmcSL/mz+k/rCpt4thhq5uD92YtK69WsTLM6QyvFc9pJ+4MfTfapMu 4kPRGoomDxZT13BGnGXTu2oFhbSV8ajo9djR/tqzh3CojPgxiEWuBOm5gZTWVo+J5kzlQ4PEWqgis W16iuEv4s8DmICeRil6Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNt39-0006zK-FY; Mon, 13 Apr 2020 06:58:31 +0000 Received: from mail-eopbgr40086.outbound.protection.outlook.com ([40.107.4.86] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNt2F-0005zA-BJ for linux-arm-kernel@lists.infradead.org; Mon, 13 Apr 2020 06:57:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hgnJw+rSwlHlCGDYrOQTfnAbdEDNa2akLDZzzwwO8N97E9FcSzq07E77ehHEdrOXqq/slXu+s4D9dPz/LUZV2QxPaa1fn8W/Su4ba8ErRP430fHW4WfOFcbZZwgj26gMduQy0B02IEXuB8PT1e3VVpk1r/0owE/qe0usAd3JtHUDDkQ2IxDzCS4AuvriY5megdgLV5mVuGfJ7ab617aMsNAU6d5QL6Z+fML2j5ejISQrpyMJcNoMp5JlLbb6VmYfyus1dLxA0RzjVfWuosElaSPEwIdcOypecCUnRNg/cgeOa/EpuHkpCPTNfhISnh0hXfUMLEBj+WEM2rHdCLQcdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G5bNGB4Vj1ndOSm2R0ZXcZjkYN8QJ6Q5K/dcnYYyrK4=; b=ih89WqhdW+cHoO0VuDC4zgOV5A3qMIKOWWbupY4zUBk9JK1bceh7NXwe20utq/K+jDeddp6uHnFpn4cSiMIMc/+z2+pMpt8q34fN6XVIxw5dFt9ZGTnhMaP3lkqw7+wozmYZeYfXGoJfFE5zpu3AOfZztah79ocfa9bziobIw73/Jq7qA2KRmlfiLdHpPXrjqYcrmh4VlbEEGKu1hSjTZnpCw3oiHSwFQxeMkUaEjpzVmw0k1xda+J0E/eG9E08QRABRgLzTsCVOx09kN1C1ZWqCN7qy0DBYnIijvDiiaEzQfIQJcgFJ0oE87TlDAOYQb++58Zgde29gpMAZpKl42Q== 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=G5bNGB4Vj1ndOSm2R0ZXcZjkYN8QJ6Q5K/dcnYYyrK4=; b=qGb06RJymLFHu1u+ZThbRleLNA9P4J7wh7PqxhmN5mEjTD2rsaQaQY4KZmHi3EIiZOgSDWvUP/QZe611IU7nFfd/MCtD/1TN+EJOZKRPOYHNq7Xvq5qjSOoxRSj0XpRhlRJ9IgtFYv1+COm4fjEkgij5/sQAMM/3zmS5Jw/iK4I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) by AM0PR04MB4564.eurprd04.prod.outlook.com (2603:10a6:208:74::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Mon, 13 Apr 2020 06:57:34 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::ad44:6b0d:205d:f8fc]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::ad44:6b0d:205d:f8fc%7]) with mapi id 15.20.2900.026; Mon, 13 Apr 2020 06:57:34 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, sboyd@kernel.org, robh+dt@kernel.org Subject: [PATCH V2 4/4] ARM: imx: cpuidle-imx7ulp: Stop mode disallowed when HSRUN Date: Mon, 13 Apr 2020 14:49:08 +0800 Message-Id: <1586760548-23046-5-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586760548-23046-1-git-send-email-peng.fan@nxp.com> References: <1586760548-23046-1-git-send-email-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR06CA0143.apcprd06.prod.outlook.com (2603:1096:1:1f::21) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR06CA0143.apcprd06.prod.outlook.com (2603:1096:1:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2900.15 via Frontend Transport; Mon, 13 Apr 2020 06:57:30 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 44ffc4fa-0533-4cc0-511d-08d7df77f154 X-MS-TrafficTypeDiagnostic: AM0PR04MB4564:|AM0PR04MB4564: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:64; X-Forefront-PRVS: 037291602B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4481.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(39860400002)(366004)(376002)(136003)(346002)(4326008)(86362001)(8936002)(478600001)(9686003)(316002)(16526019)(26005)(6512007)(6506007)(6666004)(52116002)(186003)(8676002)(81156014)(6486002)(69590400007)(66476007)(66556008)(2616005)(956004)(36756003)(5660300002)(66946007)(2906002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M8bQ6w+3ovmmvW2CpEYxoyC3f38saQDP+Ftaqn81zuuCFmROCAY27ZuR6PUloSzBaaMvj5wOf/WtTjVe9fRzhxpPpAfONxHIUFnOu0hTjp68D00cxmMYkXJ/N+zHKAXVAtAsymjH11FCNb3Qjxk2iL2MgshtrDwsD4nLKlN7+H/MP8W4Wd2njRobiSiW1S/6SuRY0iBN3M+UZnXiK+G84FryRGYgiRsTe18RYuunxtM75gpuNAQ1Cw0vYEaGJ8MVB66R4N7/BQDTSETeCwuBSPmch9jJIxX/jDo31MHN9jI1tYANSuLiH6gyeJrRu6/x9LH1jHfBa6TsRCCA+NiM+PAfRxDe1im/jO8033oxjh/eDfA6HVUv7WfxbWPZTUlV9tq2/nW6W1ZOPdwlSm3/5dxuSpVsmJCykd1Wc9d/3rmQsobH6LNQVnjJUgGfraypRAq1dCC+KZPeAzismQxZ3hrlMbe+MwKUNep+T9mHMbtCDGZsZFldeVkVeTIysqp+ X-MS-Exchange-AntiSpam-MessageData: ocnVeYye+I3gXEAzkGIA3zEbNMBnSvgWz68vt/2ELxD5GUU8rixLJK4x73E3KwZMsdrty5NrOHV+7MAYpWe+xSl7zVjKY8vv2JPsTrVNOJW7rOrUu0AeicyottOHMmhij5omOVN7U/2kdsEs3rxBuw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 44ffc4fa-0533-4cc0-511d-08d7df77f154 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2020 06:57:34.1670 (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: WI56JPmiNZuHbR7+kCFMSkqpW6X4eQtPhQ9qqCHbfAr80dbmSPhOGgtQj8huIHLeeAqg6+h0CRvwU34DIwZhnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4564 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200412_235735_401143_86AA7AB8 X-CRM114-Status: GOOD ( 12.35 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.4.86 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , abel.vesa@nxp.com, Anson.Huang@nxp.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Peng Fan When cpu runs in HSRUN mode, cpuidle is not allowed to run into Stop mode. So add imx7ulp_get_mode to get thr cpu run mode, and use WAIT mode instead, when cpu in HSRUN mode. Signed-off-by: Peng Fan --- V2: None arch/arm/mach-imx/common.h | 1 + arch/arm/mach-imx/cpuidle-imx7ulp.c | 14 +++++++++++--- arch/arm/mach-imx/pm-imx7ulp.c | 10 ++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 5aa5796cff0e..db542da4fe67 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -104,6 +104,7 @@ void imx6_set_int_mem_clk_lpm(bool enable); void imx6sl_set_wait_clk(bool enter); int imx_mmdc_get_ddr_type(void); int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode); +u32 imx7ulp_get_mode(void); void imx_cpu_die(unsigned int cpu); int imx_cpu_kill(unsigned int cpu); diff --git a/arch/arm/mach-imx/cpuidle-imx7ulp.c b/arch/arm/mach-imx/cpuidle-imx7ulp.c index ca86c967d19e..e7009d10b331 100644 --- a/arch/arm/mach-imx/cpuidle-imx7ulp.c +++ b/arch/arm/mach-imx/cpuidle-imx7ulp.c @@ -15,10 +15,18 @@ static int imx7ulp_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { - if (index == 1) + u32 mode; + + if (index == 1) { imx7ulp_set_lpm(ULP_PM_WAIT); - else - imx7ulp_set_lpm(ULP_PM_STOP); + } else { + mode = imx7ulp_get_mode(); + + if (mode == 3) + imx7ulp_set_lpm(ULP_PM_WAIT); + else + imx7ulp_set_lpm(ULP_PM_STOP); + } cpu_do_idle(); diff --git a/arch/arm/mach-imx/pm-imx7ulp.c b/arch/arm/mach-imx/pm-imx7ulp.c index 393faf1e8382..1410ccfc71bd 100644 --- a/arch/arm/mach-imx/pm-imx7ulp.c +++ b/arch/arm/mach-imx/pm-imx7ulp.c @@ -63,6 +63,16 @@ int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode) return 0; } +u32 imx7ulp_get_mode(void) +{ + u32 mode; + + mode = readl_relaxed(smc1_base + SMC_PMCTRL) & BM_PMCTRL_RUNM; + mode >>= BP_PMCTRL_RUNM; + + return mode; +} + void __init imx7ulp_pm_init(void) { struct device_node *np;