Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6241135ybi; Sun, 21 Jul 2019 12:44:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsgF3H6HzXHgPEROWPcif31RTloerqlB08ytZySTwJjTYDwDhwWyELbKnR2L8y3D/C1iaP X-Received: by 2002:a17:90a:9301:: with SMTP id p1mr72868105pjo.22.1563738262846; Sun, 21 Jul 2019 12:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563738262; cv=none; d=google.com; s=arc-20160816; b=O002TQtVRjP+ucANtcWGk8V1UcHBs7m/gnp/vlql4bRjoh9LX9WvFs1+dR7g63tMMq 5p4N9T7TxHN8LhhJcNwHt8j3pvz8979e5e/DooU+TdaPDuUoWSntnoLO3rV9STzGrrLo jYHdbJBCXyOzhaFtTeuXeuPoD7vMRBsBbXY4HgE+KWi5eZbiJK8OCa2Q1Sb2kKh130s0 OYS/vgR1k3Z71rWr/x4jPir9pOUNTivy+khnuaLR4wAiA7TFR8lM/bTuAnF3hMG2f5/b hRM/qJJICIQF8tJprm17V7YF3TY7vBfGoflvZ+mHgqLMUmCeJKL653PygnX675ViyN9N GJhg== 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=vgWkSV598c3dO93KPU1w6w/1sZicmNlPI5d9nXeZu1I=; b=O/NZmHn5rY3A85t7q3bOWcpV5PMS71Dy4Gk7+z0FwF7zBTgt6UAZoJFh2q/ejaZ20I 2l0dBDLrQmzfWyFNXe3EGpeZwSLfMnnyWZlkehmcmnhFCt2CzjdzBGtq/qymGOlGITvX Jj+/S28VozJUM1FNA04YtF+3WbcH3O9IObkhizfTA+jOabU/0PjwKfL0dKVmTEdWolKM pbG4F7spoKjOVjdIjxL0cXxbEF4WuGOwv404laIUaTdhRQdPPRr6QDSdWzblun+aSCr1 ukEufs3lcEgH08YF+tlCK9IFg8byHqqr6pMyBdh5fxea/moczeHcf+Pn01ZI/EOft4DX xZgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=cq3Jy4Tg; 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 w4si6285558ply.247.2019.07.21.12.44.07; Sun, 21 Jul 2019 12:44:22 -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=cq3Jy4Tg; 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 S1726831AbfGUTlb (ORCPT + 99 others); Sun, 21 Jul 2019 15:41:31 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:15871 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727747AbfGUTlV (ORCPT ); Sun, 21 Jul 2019 15:41:21 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 21 Jul 2019 12:41:27 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 21 Jul 2019 12:41:19 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 21 Jul 2019 12:41:19 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 21 Jul 2019 19:41:19 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 21 Jul 2019 19:41:19 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.164.85]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Sun, 21 Jul 2019 12:41:19 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , , , , , , , , , Subject: [PATCH V6 18/21] soc/tegra: pmc: Configure core power request polarity Date: Sun, 21 Jul 2019 12:40:57 -0700 Message-ID: <1563738060-30213-19-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563738060-30213-1-git-send-email-skomatineni@nvidia.com> References: <1563738060-30213-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=1563738087; bh=vgWkSV598c3dO93KPU1w6w/1sZicmNlPI5d9nXeZu1I=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=cq3Jy4TgoHuRTQ5sooawz3Lsk63blyBRUIycGuHFcRae8SdRFUF4Bacr1McSp6eaR W/jHjECVHPZzpWxRElejV9SoqHlDZfTce+kZwxz2uZVHJMkoT1bUAvAfZztOqcd5Zb aMOEpVtDMjOi8sNtGYiTOb8ZjeVfPP7yULdKj0uBQWma2nczY3/oukEoojxGbcSS+k g5wLBiYeGYPmCEPR+L5hlXTFdhjInORw230fff1vuuO/5C4LfRJHCQK2K4L9plc/8t Fsjf8uftIxgrAVmdyXUjKr2nPGvyCfYx+p0fDAqkn5jXxASbzUrOzTsuUHw0rQaWgL 32lW9FSsB9VCg== 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 c556f38874e1..7521394b94ab 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_CNTRL_LATCH_WAKEUPS BIT(5) @@ -2303,6 +2304,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