Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1918516ybd; Sun, 23 Jun 2019 20:04:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVII9CSwUM16RyTWbhbcNv1Plo6mWiQw6Di3StQE9dpzn14q03GcwkM0y5tyInVRXFRe9W X-Received: by 2002:a17:902:694a:: with SMTP id k10mr71457996plt.255.1561345479593; Sun, 23 Jun 2019 20:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561345479; cv=none; d=google.com; s=arc-20160816; b=kKpSAYmalbt3LuuGQT46hqKeinrWsPAol+bh/pbD5py1lKXAEJmxBgSD72wEk8mTzg RogaOzcQJj5O7wBJVQK0gjaJay8Nw8KVmUFOqOipk6mL4OHkLllIP0Nvpu17tec4w3g6 GguNt0MOfPAlOiXsTTEeuJXIw9MymO1bDc4KhevuO6yfEsj7AxBYF0+XgpXSnOSWV4bN 3hIdaX9B95plnnFeeOzlsLVWJuJ3dpKqwIz0T4EMEQETNeaaFxU+NbhcIpfdU8SIKZjD MbFqxeM8RFdswLLy+wLy/7viET0TmI0ORvGekzhBiSWic7aWiY2uTiM9tJ6YQ9l0t3Ps kGOQ== 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=ZIM1lgKmGOLI8vjBUZA7Djdy5mObSNe1HI0kza+VS88=; b=Z+BBhV1dOr/77jbav51PPIPyD87hgUmh4h639zXpbv3yUAQt/h37ioWK3srp8L6pnY T2JGjHkLtXmjqat5skMsZsyp1+YnTcsk4nid8l5VEYBmssO7VnGrtd418Q7KVG2+mkGc kwrA+f0JdN4dWLeOjG6QaZJ1IBX2KLRMMTLyCEKSB9dOjNNCWHW8DIXIqttrVcwjsafn /Iv0vETwQ0VCB6T1kbvXOkxq2kAG+JN2nQDRJJ26HXruWnQhjcKBRseZ+qWvVwkfEndR C0i3B7+PRxmN+/AmCvloplAOrRvoIV2J7AvZnDwtX1MAtY3hfZjUtcFN0IA5hU7EhHSJ MeGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=FFrpYwGf; 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 d7si9290119plj.74.2019.06.23.20.04.24; Sun, 23 Jun 2019 20:04:39 -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=FFrpYwGf; 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 S1727602AbfFXDDw (ORCPT + 99 others); Sun, 23 Jun 2019 23:03:52 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:13255 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727588AbfFXDDv (ORCPT ); Sun, 23 Jun 2019 23:03:51 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 23 Jun 2019 20:03:49 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Sun, 23 Jun 2019 20:03:49 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Sun, 23 Jun 2019 20:03:49 -0700 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 24 Jun 2019 03:03:49 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 24 Jun 2019 03:03:49 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.174.126]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Sun, 23 Jun 2019 20:03:49 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , , , , , , , , , Subject: [PATCH V4 16/18] soc/tegra: pmc: configure core power request polarity Date: Sun, 23 Jun 2019 20:02:57 -0700 Message-ID: <1561345379-2429-17-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561345379-2429-1-git-send-email-skomatineni@nvidia.com> References: <1561345379-2429-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=1561345429; bh=ZIM1lgKmGOLI8vjBUZA7Djdy5mObSNe1HI0kza+VS88=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=FFrpYwGf9dF5STigOtKoPoynIHZvhi0QAKR/vt8NZAklLimm/K7dbFsYJp0qs4X/8 dIYqZhqEvOiimDRHlU6DXLodyFTVft+B6TJsIKvbJGRTqGsPl/AwoeIwakTBUXrr8n /73S5CU9bxLy3WIuJII/Nu392T9UFkRw0TYH+bHEVTV1aGhiWA4J5eK9AKffsts8PM jEdQV8m3oE5g8hk41QcK8b1+BcYnZuFbn9kF2+Cj1stwD+59nHTAtQUZy8d5fm0gMY 4v2HMv40/QlwDLv/Hh1+ZO3v2ZxZKeJ8AlyqR0kP7NoxoSBnwCDRBQJVu295+56Le1 A9/uEkeLOVdkw== 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 603fc3bd73f5..c9eea5ef008a 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) @@ -2304,6 +2305,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