Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6424725ybi; Wed, 31 Jul 2019 14:13:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAHGVZnLnCitGdaqz6/acgpwsx+zQN+zsC3nd9sNoC18VUXyeUeza8QzFpT4IpkRlbxWOu X-Received: by 2002:a17:90a:25c8:: with SMTP id k66mr4843181pje.129.1564607620037; Wed, 31 Jul 2019 14:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564607620; cv=none; d=google.com; s=arc-20160816; b=TgI9e1P22HEHAphF6s9LAVHVQUX9TUIGZCWhGgv19ONg6GdJ2Ag837rKxxS4CIPl1z 3Wkan1UWoHQ78TahEcOUv+Y5V7C/R67VWzWkcbLJYG4sxpk3oFOav0d6VLn9cVxWNCM6 DOsoi5CesDgVsgHSwK+m6DbxgtXPJ7SAt7aA1maGoF4YNxnl4TlBxJ2TebhSx028qA0s L33hhFSs0c2JDfwxXdtp6MVey4X9PfjPWjK8XN+ubrndQEdTvWbmnoBRKJzpSB35L8oI DUwqranFIThbw5qMq2+/eKejWS8icW8ENbh8oH3zO6smA8bjxXboYh/WaI2oTRMsGJLn 7EgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=+irRG9Bl8eDAFdqPLYIcqsrOHQrSrUdohaTd6jMdMg0=; b=JF/hSsIhuS40udHg8SYBcSxIFGJ/RccCVcW9btDdjM0GMz6yEHG4mLbqsyDx0hiwj+ H1QB9AyjmuNb/Qnqfo6lVt77B2pL96bJWak9BJMb12I1nI8JEiBBTXkT175jI3IeSMem JbdB82zB9lFExhbbSvYr5JwbHZpTgkO3bgA/LUu9DbgPDSY0OyByHaowU+JKiDJ6RSeT o0qkMIF1wWNpWMqKvB7cX8EGTH2xph8Y6IpPjvrNZO6MHkJDdj9WCGXEkWFwgmLnTDwB xpdS8iyUSmT/H6fQnnI5OLXRgTahNHq8WyhL39YHiUODTOfbNN4NkHYXRoBguP+3afCL RLFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=g01XtHzo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7si33086034pgv.86.2019.07.31.14.13.25; Wed, 31 Jul 2019 14:13:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=g01XtHzo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730789AbfGaVLS (ORCPT + 99 others); Wed, 31 Jul 2019 17:11:18 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:10599 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730470AbfGaVLL (ORCPT ); Wed, 31 Jul 2019 17:11:11 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 31 Jul 2019 14:11:10 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 31 Jul 2019 14:11:10 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 31 Jul 2019 14:11:10 -0700 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 31 Jul 2019 21:11:09 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 31 Jul 2019 21:11:09 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.110.102.167]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Wed, 31 Jul 2019 14:11:09 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , , , , , , , , , , , , Subject: [PATCH v7 17/20] soc/tegra: pmc: Configure core power request polarity Date: Wed, 31 Jul 2019 14:11:00 -0700 Message-ID: <1564607463-28802-18-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564607463-28802-1-git-send-email-skomatineni@nvidia.com> References: <1564607463-28802-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1564607470; bh=+irRG9Bl8eDAFdqPLYIcqsrOHQrSrUdohaTd6jMdMg0=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=g01XtHzoghg3OJ02T+pkaYiZEM2BJs9HexTo5k0JZ95R5t386+H8TVA5Sgs/GZT+5 WehzE/FuxCjE5DEMdZN6Q3uDtPDcTB3idS2ReVlnsc3FDzMf7ygUp0/qS3mLtJ4vAT EkX6DP2jFcB4fC4CVbWmT6Y9F2HBhlvkW2EwupkiTj7XEzwUHU2Sm5BkAWuRQviWUs LMqa8OZoUP4ZgfA7TPob21KpZfGrdrz7TFpFyd6OzUFXYTH1cTmhhbwemyLClSPJgX IypEpeZv2Fchg7uUTEJ54uN/wgN+CTkNW7m9NhJCxibxovr5Zq5eViUoHZMz8u9gQf iaoa2IhGqpSWQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch configures polarity of the core power request signal in PMC control register based on the device tree property. PMC asserts and de-asserts power request signal based on it polarity when it need to power-up and power-down the core rail during SC7. Signed-off-by: Sowjanya Komatineni --- drivers/soc/tegra/pmc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 3aa71c28a10a..e013ada7e4e9 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -56,6 +56,7 @@ #define PMC_CNTRL_SIDE_EFFECT_LP0 BIT(14) /* LP0 when CPU pwr gated */ #define PMC_CNTRL_SYSCLK_OE BIT(11) /* system clock enable */ #define PMC_CNTRL_SYSCLK_POLARITY BIT(10) /* sys clk polarity */ +#define PMC_CNTRL_PWRREQ_POLARITY BIT(8) #define PMC_CNTRL_MAIN_RST BIT(4) #define PMC_WAKE_MASK 0x0c @@ -2290,6 +2291,11 @@ static void tegra20_pmc_init(struct tegra_pmc *pmc) else value |= PMC_CNTRL_SYSCLK_POLARITY; + if (pmc->corereq_high) + value &= ~PMC_CNTRL_PWRREQ_POLARITY; + else + value |= PMC_CNTRL_PWRREQ_POLARITY; + /* configure the output polarity while the request is tristated */ tegra_pmc_writel(pmc, value, PMC_CNTRL); -- 2.7.4