From patchwork Wed Apr 15 12:40:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11491151 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 C46DE1392 for ; Wed, 15 Apr 2020 12:49:32 +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 87950206A2 for ; Wed, 15 Apr 2020 12:49:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LxykojqR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="X5QYqljn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87950206A2 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=NloPMLKTSDu/3gCJFEerLuxr/R++XMC7RTbaTAhoJ6M=; b=LxykojqR5a90D2 l35lAZ/CGpsu/PAVfDvuaFr5kX87TB1ARc23Rz+Wz0lojSz1RjBkzzrFfT7pFRobfnoBVFcg864c7 zk6a6lXveda5Xt8jYRUPOgpYkSPL2leeNWI3p3E+nFsAKFOLk1q58hVQ3L96rD22cpg5x3N+G5fi+ jPy9JWtP0lTzBQ4kObvIusF3k+0iwClkR0XUm6ujKjsn7ahY5PMuFJ73dRmpfya6reGPjOlqaStFj ue8QOoGrX0BWxMovS3K9ZV6OtyVZAz5j3ZFrAUncSjQti1ea3BGZPwh6ds0OIx1gbgQeoICN0GgkP K3b1nte3bwf0f0NO6WNw==; 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 1jOhTo-0003Lc-3f; Wed, 15 Apr 2020 12:49:24 +0000 Received: from mail-vi1eur05on20621.outbound.protection.outlook.com ([2a01:111:f400:7d00::621] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOhTc-00038j-M9 for linux-arm-kernel@lists.infradead.org; Wed, 15 Apr 2020 12:49:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A06RtMnieG7I1kIm8ygYH1RBJ2vPyMk6xhh777qb/RRdooFGwCALISG4GSppqJ5rMyrFfzBunRMrr0PRlY7JBuF4CJgAyJkmA+XR2WFGXC/BBuL+Xyrpc/v6zGLKHJzyZjGAYmBVQAB7WKufYPTMnOAPVXv+CxhH/pt6ehfcYSyfzQ355xFMDeuMULnr8yLQhcYjA/YC1Fhs4BwsY+60EDHhGtE6jGMCrlaVVnmYg73l5jamfi8AKC8yPY55REnW+bSJCbjAvjTj3tKYMLngXBFq7U4yZ/6a50xeX9oJcEea9jAvUbhDPIdobNhLwJgJf5itYDHxMllQ8ko5eKf1xw== 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=0dByjc0tAMfIXhOiJhJHOqIaqT4YU/kTo4Kdenzn1qY=; b=CcMXu9RtLqcGQmK7/URTQaIniwI2XC552/Kwwn6Aa2wOH+UitP3gA/pz4j1L4vFGv9DNlfCdyKqJHqPXMMBPZ3cMES0qnbw0E0xc2CfqAwXl6q0Ng3umCrFBzjyADUAV1sTgU5nXU7nlkGOqpkUBLxgNioqM79IxOejxk3uPuLvW8BB7JZ17mZkkbSN2IAfWVciMz7M1ebfZQLFNb2NQrUGHmGxwIGZcejnXgdqOUBXvtSZsXVBq1U2eO69Ot9jnHoz0LMxOhlo9WKp4X/tvrEIURWlpRte4foGkp5d7mRSLc9TtwPEj9m7hmXJFsA3XIiYJILuiMpkK+SbO1p3y5w== 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=0dByjc0tAMfIXhOiJhJHOqIaqT4YU/kTo4Kdenzn1qY=; b=X5QYqljn4jGb5WbuiQHcLNNWfDbd1brkp++LYZx9cdEVPeKJp7Gm/okTqIe+jSAc96WY0sg8dcgofXKHsZbUiKKFMzEsI+kL9TxQzt6QUgKX6Nvegjj9zq/QPLPynb2Y/0RvUtz8pNXZB1Lza6tvXiFQ/oxDU9bDCGzXfVcEt3A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0402MB2856.eurprd04.prod.outlook.com (2603:10a6:4:9a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Wed, 15 Apr 2020 12:49:09 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871%6]) with mapi id 15.20.2900.028; Wed, 15 Apr 2020 12:49:09 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, sboyd@kernel.org, robh+dt@kernel.org Subject: [PATCH V4 1/4] dt-bindings: fsl: add i.MX7ULP PMC binding doc Date: Wed, 15 Apr 2020 20:40:46 +0800 Message-Id: <1586954449-17463-2-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586954449-17463-1-git-send-email-peng.fan@nxp.com> References: <1586954449-17463-1-git-send-email-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR02CA0098.apcprd02.prod.outlook.com (2603:1096:4:92::14) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.67) by SG2PR02CA0098.apcprd02.prod.outlook.com (2603:1096:4:92::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2900.17 via Frontend Transport; Wed, 15 Apr 2020 12:49:05 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6140373a-d7b6-4320-8fb7-08d7e13b63d2 X-MS-TrafficTypeDiagnostic: DB6PR0402MB2856:|DB6PR0402MB2856: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:243; X-Forefront-PRVS: 0374433C81 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(39860400002)(376002)(346002)(366004)(396003)(136003)(6486002)(66946007)(26005)(186003)(52116002)(16526019)(6506007)(956004)(5660300002)(2616005)(6512007)(4326008)(6666004)(2906002)(316002)(8936002)(966005)(69590400007)(66556008)(9686003)(36756003)(81156014)(8676002)(478600001)(86362001)(66476007); 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: hoekhTfE4jsnEr6cPOcSdUI0DZRfBNhWN7pDR/GR3qA6jqAks4rKW4WLDdrxFLWv+FlImisBFG9pilXN4zcONSKTXygMobIrnI/DV3BMthfY6Lg2rRSPgsbndJ38waTQsAP+qHOw624P2TKHhz4+YLGNV2sgdIIiQAef4tiF4cKd8HExdsRYskLgVTXo1FlW8bBu+O/uhvGL7YujwHvOKSQKbNbIyNckuMfpB5LFXy/Tcy5UpRnX/56aIrErsoWAHd7l9GkqrzkYK8pXKmPEgMu8f4a9A+kkyouwTkmo45nMO0k4Qb+sByU7KVGoorcIPDIv/AdKzrcj1q2QlX1/CiKdCJaTnQ08KmlgQS4McRJixDGPc18WX+hllVB/KnUjuWB6pgkYnf9neiSdbiKDyUSg0B9E4FdOzKgGtnFcrGuYWq+L8bS/8+wLgTSVl4g4i9BUr1Vyamc2/tnSSSsPo5QiovxwTGPqFXDGtcoYWgn7pELf0PNzX7uvTM2jjhSBBKr3RqaikPtiaki+eJxfgt3Hazc85oJW0t/kPebeeMdPmGQF6DZ07tlz9terGcUNo5PpYijkynzD93GgTMLaHA== X-MS-Exchange-AntiSpam-MessageData: 1DDFCWNXnI/iz78KZakS19QrwunLvlUfIR1rn0E2O3PU8ZGp9iiRtWqKF+peu48GZRTACDKcgEjMtw6xcODSiOqa511+/5nGZ89S2exTzOJRevLqbi6KiZqHJae+N+UCAABnwcIlSz9rCqgndEJK3w== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6140373a-d7b6-4320-8fb7-08d7e13b63d2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 12:49:09.3196 (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: rYTJlCG+5K2LCEoO+6dyshEYyIaWHKP3ad8dC9EcW1sYUDK9nNFImyUY9+7EvBUbiNOM575zo0pKGRmkSwTcOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2856 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_054912_720401_960B0711 X-CRM114-Status: GOOD ( 10.38 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay 1.0 FORGED_SPF_HELO No description available. 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 --- .../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 Wed Apr 15 12:40:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11491157 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 4479D912 for ; Wed, 15 Apr 2020 12:50:20 +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 211D920767 for ; Wed, 15 Apr 2020 12:50:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VWDfq7an"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="mlaRJqoA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 211D920767 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=cXlzuqjBbM4Ops99hVmEXvuwul7Q3FeEiPlDjuOE6d0=; b=VWDfq7anvxz01X C/3Sdm73BWdkOIFQ3opQon5qTd+NxcIP+dpZjN+f0qVHazjOquCI743mMGKgIQNsCOmhfc6hlqTXu LX9kt05g5sUAHNlbc49LImE2KjHH8Oy8SxUZpgnH+MOJN99naxkZ/LPHmvy17prhLVIyvHKFEgSc+ FoA4RZakYZsEKYVELLPkCoVC7EpWk8PaVwIsWv2HIOHfpnve8e1EQRiOCTloYizIb/gyLAG+iP7qk lxErvgDP210sOyfccGCIsKvkHlPyUfX77B9/Ud3ZB3agKxtb/B7qqmev4IPZRVCHBLDHiwcVPl9na R9ewmFv0palNeq/6LEzg==; 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 1jOhUc-0004z7-9Z; Wed, 15 Apr 2020 12:50:14 +0000 Received: from mail-vi1eur05on2060.outbound.protection.outlook.com ([40.107.21.60] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOhTq-0003Nx-U9 for linux-arm-kernel@lists.infradead.org; Wed, 15 Apr 2020 12:49:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G2WLHwCB5T0bDFKllTq8HNtTJW6dMdARXOpg0bYUhtv2+pZKiJRz0KnfN+tBr4EtddIBvYP5+qiu/Wfqr8ssmxNiTVRfnc8BYQGaFbd4eF6SKq4Kjoc2TAj810V1NAsofsSimLY+qMf+L1mGE4qtnWYoO0csgTd+nl0HDxR0blSP/HRfT7NldSPaFSCOA1+AL8TAXogBxnnopI3gTgWSxokwzbNaYpU72yA+TRwQZ6zySbndZNtHwo8Ad5hdO0edyK9365KPJ42cTJZUjPs2Yc1PTUrqGPPUXUPCWyCimWlGzJnsQarZdUxtRSyEZ99+wpzHa33Lu+ZtPp6x1evGPQ== 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=DybavP3i85ng06H4iREbLPAYZErvJ8NosgtwtwVJi8M=; b=nKBLlEXLtKAQAOaUmAWJPyZ2Do0dyEUWGMqmgtapF/Y2od8PZ83DJi9btsCB4aEVdY2y8cLwXjzTpoi8DcUO/9ldQvimZZOMfCxa17nap2fuPZpvo/iKR4wB4IFHooWzusUaJEnH2CdO8I1mocEQ/gIVZtHCu0SiDgmMfbRfvB5J16i7Q9AKueoP18jg8JqQHQ8dDTJxICMOLY7H+FeP2dUmkzrUvAb0xDkS/U9xe1YhzmATIFXoC+1BJd5B+cHRV6TBmz4qAhUC3T7iU5U2t5DCjfZYJbG+vusDTTch8Xa92mjvgScxojCIMHZa5oNYwavHH9YzdkXVpDZSiB0ieA== 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=DybavP3i85ng06H4iREbLPAYZErvJ8NosgtwtwVJi8M=; b=mlaRJqoAFpYpj44Fj3gTKp1xEKFtvsabuOlH8XY+0nFsInRGBv+Md785RSaGar1EOQapmRKszzuJ8TiiPWas1/xyEtPkahMHJ7rMktOPKILFwnLwhFPat4w1K0PATI2QkT3x0i4/5A3EoZwilLTIBKq8oNgUj1O+dly+IuAvO00= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0402MB2856.eurprd04.prod.outlook.com (2603:10a6:4:9a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Wed, 15 Apr 2020 12:49:13 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871%6]) with mapi id 15.20.2900.028; Wed, 15 Apr 2020 12:49:13 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, sboyd@kernel.org, robh+dt@kernel.org Subject: [PATCH V4 2/4] ARM: dts: imx7ulp: add pmc node Date: Wed, 15 Apr 2020 20:40:47 +0800 Message-Id: <1586954449-17463-3-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586954449-17463-1-git-send-email-peng.fan@nxp.com> References: <1586954449-17463-1-git-send-email-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR02CA0098.apcprd02.prod.outlook.com (2603:1096:4:92::14) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.67) by SG2PR02CA0098.apcprd02.prod.outlook.com (2603:1096:4:92::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2900.17 via Frontend Transport; Wed, 15 Apr 2020 12:49:09 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b11ad848-cee1-42a5-72c9-08d7e13b662f X-MS-TrafficTypeDiagnostic: DB6PR0402MB2856:|DB6PR0402MB2856: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:243; X-Forefront-PRVS: 0374433C81 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(39860400002)(376002)(346002)(366004)(396003)(136003)(6486002)(66946007)(26005)(186003)(52116002)(16526019)(6506007)(956004)(5660300002)(2616005)(6512007)(4326008)(6666004)(2906002)(316002)(8936002)(4744005)(69590400007)(66556008)(9686003)(36756003)(81156014)(8676002)(478600001)(86362001)(66476007); 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: 4U5DnITwbL1mIxHfSnppgs4n6E4FZDwXzfJjKUOkJPSBtv8nG/CqaVauQ2b8i4dNsgJVo9g5xgeFquCGjXxD27fh8k3IGMjIjuUW5tO5QUdRYvm9iInJDtPIQSJE7yW+dB15Xv0dg4P23tuirxU56co4i3H6TtqggmNrTqFvHQFtgYn3tQgElzrHUesB2OZVdGv072ojFX2uQ57bax8y91QVg1IXx+rGzZ5PTyMQT0j+NJaZ/sw4yOnxOmCgSLi6ZlpoZE6nK+dMDM/AdHomdV0ZS4fhf4IiQg6h/Hx3KxwxN3xP6LMaUeVw+Y1v1wF44DRAz/xgJaUmTVDjjkV9bgIW75hTaqTljivDu2hwAyz+uiLXOn+Ogxu7FbwwyAX0iYPJBRuAC/XnWFeWQH38+GNIWcbQByxXBSJhoaxB49fQHjFlTVUADs7TqxihxVQ1Dxi68F+fOKOFCI0zjgISaObxqvp8QjMZiJDjO20+FRtnXBP/CyGEv5Wmw+ERgpgA X-MS-Exchange-AntiSpam-MessageData: KoJFaXDWfHCRACEADt8Y+GDklArtp18Or5LsbHuP6sNGxACQhfZldEt3kvrQLepErQ+RuBjAP2kurSc5I7MaI6KhUR4ee26O0AR0mEWHZbdeYzGWbUnUT2nLHvZdWdtsQUvNfgNsnHZFvWrLUqK9bQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b11ad848-cee1-42a5-72c9-08d7e13b662f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 12:49:13.3678 (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: gGxWG+g88dKxgCzXtOo3P/yUqd3PyHaR4fT6HnZME8vi7LeCoJtqqpFP3kX8ZvUgtpzL+jS4BylvLcVNKpd/WA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2856 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_054927_111379_F548072A X-CRM114-Status: GOOD ( 10.05 ) 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.21.60 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_EF Message has a valid DKIM or DK signature from envelope-from domain -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.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 --- 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 Wed Apr 15 12:40:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11491155 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 D97201392 for ; Wed, 15 Apr 2020 12:49:55 +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 A432C2078A for ; Wed, 15 Apr 2020 12:49:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gpjzzKRj"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="eEnhZBBs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A432C2078A 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=E7FKtVUvepCGcuaL6VJJRoC3tj2UbpwMehMVDZVD6RM=; b=gpjzzKRj3mBRkK 1qN7l2/6u/RqY4sHpCJ+nacjc5Gstj01fBtUL5LzJWgf10fjW5uu3NeYqyGaiXnLnbi8DmsPtbrg2 qsvWmfF3eUpRu39uY96esBb7UIgz/PoEp6LnDq3HfXiZnClOxiNJ7gRpQMisbQpF9J3L94/UMeKST 4YSLF4UzNfnR/YuWGK8e2UUkt8qcK2XVQRadlbkyXts+dZwfVD2SlWYJQUUscH4CdyeIrxVTuwQkp AofVJyWnztnE3bk8VjdsCtKdokrPo4RIVcODFqD8FfMzO0ShbS2Th+Lnmi+H7L6S7pMsbEOEt1q5e 5NJYeL/3YVczUep7IU8Q==; 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 1jOhUC-0003hY-QI; Wed, 15 Apr 2020 12:49:48 +0000 Received: from mail-vi1eur05on2060.outbound.protection.outlook.com ([40.107.21.60] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOhTt-0003Nx-0n for linux-arm-kernel@lists.infradead.org; Wed, 15 Apr 2020 12:49:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PaTxKtJZtl4YCHMldnqY4MJnQP2MFtN6qObp1Ff47vni1SvorzaYg162yqBhV5UCyJPyTChTZ00zlC/OoU/5JSEN7utNKTm1dz/xpoE1jCtGDUAH/0wb0zF3UkBc3VCk3sI8+LZFqFvD5wwcs0vx1PBc06fo6BmDJvkM1n1WLmEuMAt53BEiJODnF4awfuMqx6ZiOtcIcoLlkgLcexuXFcG7KrBjpVTA4zgcnqSsnlJXeJ7Oc4qqDthehvQMWOOh7g6ibnk9JVCXW13YpPFnf1ZZH+gNg/9Zmv+Zj0yHu9w8JhKekeUganS2m6OVd4F2Ll1az7CRv7v3iOI3CQjUZw== 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=Ay+9PXBCAMyE3JNz/XEu4o0HEVcPTs3bbzwdLXVpVwI=; b=IgO/cB1AVIvzjPO4O8YYQF/OOjmW4tsXMFBWWZhjaTGWncjJ0ujtStsCetfu9VxUzu2XykVhbt0gOi833bMtBK5v6LK+jQCRvSOUv1fqPwRcnS8csKOxCT4uMISGLI+vHpjQq2RH5GXi5kaPci0ujqFcI8y01mfkW+XcBxXT/t7Vyw6fEGcKKjYHRsFgenUy2qhDE9Pr7NEZ1AXigqfZheZhQcOs5lYs/Sc1A+DPojUhqmhEO0++DGpK1TAmIUxFsekC0H+po+sC8s7JB8QOvtniNwGpamXu1G/ypH722GM3sswFXqgdRUKxv+Nu3EXTehjm3wQVoRpRq9Gy/fsSjA== 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=Ay+9PXBCAMyE3JNz/XEu4o0HEVcPTs3bbzwdLXVpVwI=; b=eEnhZBBsfGKONx8A1gQiJomT2Fr2gFsdcF6DIK8LvvGMbKH5FBX9Vd9caHWdM9k8NgZ5x7E0DkQqmZJNwIZFWOm3or8JKA3DWzcrZq+Ag2C2NqJbFGS/NqwkM2OEiDPOtoR8bvYXpsR+jdBkY/i5Y53O0I7OlYKPNSOB28g7OkY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0402MB2856.eurprd04.prod.outlook.com (2603:10a6:4:9a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Wed, 15 Apr 2020 12:49:24 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871%6]) with mapi id 15.20.2900.028; Wed, 15 Apr 2020 12:49:24 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, sboyd@kernel.org, robh+dt@kernel.org Subject: [PATCH V4 3/4] ARM: imx: imx7ulp: support HSRUN mode Date: Wed, 15 Apr 2020 20:40:48 +0800 Message-Id: <1586954449-17463-4-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586954449-17463-1-git-send-email-peng.fan@nxp.com> References: <1586954449-17463-1-git-send-email-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR02CA0098.apcprd02.prod.outlook.com (2603:1096:4:92::14) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.67) by SG2PR02CA0098.apcprd02.prod.outlook.com (2603:1096:4:92::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2900.17 via Frontend Transport; Wed, 15 Apr 2020 12:49:13 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e53b5eb4-976b-4c65-0bdc-08d7e13b6893 X-MS-TrafficTypeDiagnostic: DB6PR0402MB2856:|DB6PR0402MB2856: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1265; X-Forefront-PRVS: 0374433C81 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(39860400002)(376002)(346002)(366004)(396003)(136003)(6486002)(66946007)(26005)(186003)(52116002)(16526019)(6506007)(956004)(5660300002)(2616005)(6512007)(4326008)(6666004)(2906002)(316002)(8936002)(69590400007)(66556008)(9686003)(36756003)(81156014)(8676002)(478600001)(86362001)(66476007); 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: p4z9hRsgZiepscgp1RaclslEing86gPcrkfcl5A+aio1mLPYphzVfBeP1D1CRSzYomdAgMyAljKgswKAYXhQPbJTFGBEKz84O3x2AxxhAg0Icm3ZK6mEcUsJnKQkKvqHejZlccki1UKo9Bw6lpcEFDFaoPm4bTnk31UcqJi2p5wlDG0ve90oA72s76I+xnLIVXySUkbd6f1AG3SqXvVssI+3p54f1h1Q9jy61z6ldRnKJ0Fjj/x9eeFodFjR7r/ahuWbVXFwtwz8ew5h1t6Kl0ZXEyqA3ZM0E8XIjaLrFFkmxImLL9x0kOIXKz3lheM2C5DDE1LUK8yRRYb1YNR+N5iw+3QOm153OILKEfnSd13/IQoJGGHroOAkURbMDu0TJUiVnsxu5WWLK9NZp94YwuGQFR654aCXQz3jIwHhEUY7uzr50We18B/PQy+wlr66enmrG6XQSYCG8WsieccQXxEzmSpy8v2vwRHGvfbavVj1l9inAy/IFHPo4GHCspz8 X-MS-Exchange-AntiSpam-MessageData: gg1GFHYUbhaJ1hSZcCfHrQiIbuimrYDgUgYLTu13p8qz4IbSTgAzurviCSyW3u29UUtgdZhnf8vqpLJgS44SJZg5SrXMJ9W0EMiKYLqZEnVQbvT9/mQQgNQGYGlFfAP+ghUCjxro+JWy8x/sQFdLYw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e53b5eb4-976b-4c65-0bdc-08d7e13b6893 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 12:49:17.3140 (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: BNRPNf4zIwGhHEKlG4L0PE4w3FYslEyV9nXxtiBLCzWLNtOfwjkp9U3M3Biqwwy0k6uaYzZ9FvsdnrDp4LOzzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2856 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_054929_120638_A7E7AC3B X-CRM114-Status: UNSURE ( 9.75 ) 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.21.60 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_EF Message has a valid DKIM or DK signature from envelope-from domain -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.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 --- 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 Wed Apr 15 12:40:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11491161 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 6F2331392 for ; Wed, 15 Apr 2020 12:50:34 +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 4AA2B206D5 for ; Wed, 15 Apr 2020 12:50:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rjslNsTw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="L8Jj47Z8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AA2B206D5 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=NVgnKP8qlxaWQjP9x00rY1t6flw5Ovt1f7u/CoouBE0=; b=rjslNsTwNgqBKv rNip7YUMxuPfp4IHMr7kH73T6nFirKf1h5mR1h1GjdXgxhntIXA38DQnOiifjPpAGHpBUtp8qEfdE AdHi3ZQPHkCuc615fTdHqjXBDrAQ8t/5b/X15rodImjKKQ2nzcAcZE18PzAgKOp7NELob8Gd5vT/+ LqK2/psA0xbkUW6RMM2HJq3tAxceOnKYVbo33dAJ414Fepn/oFuhw7WKSFNOxJKcDRqfH6kQe7U0I l1R971L6xrIL6TSojECA5bnnAYv2AOFApphhA7EFoaIOBd1Fw2lu1IBr0/8RppPNmS6FF70FX21ou 9wUAHfA45Vs2W4C8lamw==; 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 1jOhUq-0006ad-83; Wed, 15 Apr 2020 12:50:28 +0000 Received: from mail-vi1eur05on2060.outbound.protection.outlook.com ([40.107.21.60] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOhTu-0003Nx-UI for linux-arm-kernel@lists.infradead.org; Wed, 15 Apr 2020 12:49:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NCOl3YhRgxuUyITX3J5LxbQ2HTwRBjWwS7FSvkfJPZJu2FmBtIiaGiUQOEI8e/FjXWZCudJR1STl4l5tLz5MNqn2G7XJCUzBxAuSX2Bh+/26U8Ic4mzdth5JBA0zB8mNjv+vCiTdjec4jEHR05/kmSGwHel3CfZNisN8ZFzRu/Hwl+cM/GD68PbsKEj4z9EP1jHdBGqcP0P6h0Gv/jlcChfcVFn0NcBexMzPSGqK0lgsNwmpBpkGXvc6M4dNzhPbTru8i6vfsK5zjoUCVSv1Yhm3bdGiJg5MXrKNua0dbSsjFbkv57eTYS/QPWwbhYFa472I6wbojl5XYkQGCjeoQg== 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=/GhfP6seJSSyoKs3zhILEbAv/arENkWUq/uDfGf4Vxs=; b=TEKmFXWJIesinfY/uudxMVYzN/xtHcIN58DNH3+zDACXsfnrwPfPBYXWpRITSlVOdCIEsG5UOrCmOmq6Q3BOdAy106kS9Dfl+K+FZsoiO7UG/X0CXVp/wF9yQZOITQ/p5tqcx+cedhsKW3a9d8GtmBUjSQRHNIxLwI3xo37ry36swzge/zkgKHo2jSm5Qc4LD/4w30k2NgpP4pI0xLl4lNDROWfHanNx2j8uJmlGb0bgpLymlGupdAaQBjQzCKoBvrd1ieYTJvyj68HP/Gu6oTGINXHGdij+Dd7vrRcMLIgIPOYbIxTK6ljR0ySM8Ht1gSdAvW3QipjXpBsoM7yg1A== 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=/GhfP6seJSSyoKs3zhILEbAv/arENkWUq/uDfGf4Vxs=; b=L8Jj47Z8I3h9pV07cROJO7wL7cZaQXdxzPdxHtaGC+sxKzpvyAhacjMu5Tcisod42K3A5+qYSUmrK4HWfBYtqstnsoDdk07EXfvaL9miBHtcjQkg9eKDnfcahD0TBBVEBKJJgVARhtXIVgHrUNVnxNmMlsGiRa05lb1nIo1oMgw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0402MB2856.eurprd04.prod.outlook.com (2603:10a6:4:9a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Wed, 15 Apr 2020 12:49:24 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871%6]) with mapi id 15.20.2900.028; Wed, 15 Apr 2020 12:49:24 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, sboyd@kernel.org, robh+dt@kernel.org Subject: [PATCH V4 4/4] ARM: imx: cpuidle-imx7ulp: Stop mode disallowed when HSRUN Date: Wed, 15 Apr 2020 20:40:49 +0800 Message-Id: <1586954449-17463-5-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586954449-17463-1-git-send-email-peng.fan@nxp.com> References: <1586954449-17463-1-git-send-email-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR02CA0098.apcprd02.prod.outlook.com (2603:1096:4:92::14) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.67) by SG2PR02CA0098.apcprd02.prod.outlook.com (2603:1096:4:92::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2900.17 via Frontend Transport; Wed, 15 Apr 2020 12:49:17 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 18929127-4cb5-4ff6-091c-08d7e13b6aed X-MS-TrafficTypeDiagnostic: DB6PR0402MB2856:|DB6PR0402MB2856: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:64; X-Forefront-PRVS: 0374433C81 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(39860400002)(376002)(346002)(366004)(396003)(136003)(6486002)(66946007)(26005)(186003)(52116002)(16526019)(6506007)(956004)(5660300002)(2616005)(6512007)(4326008)(6666004)(2906002)(316002)(8936002)(69590400007)(66556008)(9686003)(36756003)(81156014)(8676002)(478600001)(86362001)(66476007); 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: UsK+1r3tBdr0nfyWK2NC0EHlSn/d2QNoy2lZjJVozqMjBys8Twduyes3oBGfRdnOEeP4aO/SO7gXk14CwPJfD5DZvReo7z7JjBJLFEiztHiBZ2yV1CK1GMcw6STYnDwWrKZLWMYeEOUzpTPhSUUbRizlS2WZApbYivsRFYM4PTk/38rVxq2AtMYXp/Nmvw8/SRIUVvVI1ILMPzKr8lLeDcPWXqSxIMnbJs/UUQlEMjEc/f6mDd5XOwHDVfMZ8gWmC2Wh0u+evBlCDTePcsSAr0M4/7GXyd+qVUW47GkfFl8s/5v2A9XFerWnrUFLGC/v6J5p3hoJxlLYcWw+Xa8W6c8XGvwakdOXJoF3DZv3K8SXl7oA/w9ILoWNLRVlLsGoHWlLnRWHgzFjCqoh4yofp5sBsA7lTqO3TToUo+rvnH3mWJpcZCe0uxmSvJOv6HJKtbnKKiRaGDgwxFLhQmTuA9EGg+WXWotpDURnKeEWjuBk7Ak9RxSPHz7aOF8mQ6TY X-MS-Exchange-AntiSpam-MessageData: rMo/px1q3SGFzGDKOYb8+1CLSG+RiZsybvysxj0uWkKV3zZAAlrPHIogQySQ+vZOwALrE9HOupWA0XpDKzYdM/DpWvFWrc8HqSAZ3sJ0BDVvf5WHTGlu2iV8Dqnue4BiBXIu9pxlJFId2Ke5nCsLeQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18929127-4cb5-4ff6-091c-08d7e13b6aed X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 12:49:21.2432 (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: lOpo3v7Tk8P8t2uqLW4y4EypqBBNXxZcN1gmTCicr/VmqIwHkBVJbr85enqgSaCgHd6YwIwaw1/Y+GUS3mNKpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2856 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_054931_014970_D7396D3F X-CRM114-Status: GOOD ( 13.07 ) 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.21.60 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_EF Message has a valid DKIM or DK signature from envelope-from domain -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.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 --- 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;