Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1317518ybl; Fri, 16 Aug 2019 12:44:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqybl3AgJkUtKyROOQPnd4T8mqoVtoyuMBwbjA0vzq8vAfnGH0KANH/K+f1CCftMnWRyKJLu X-Received: by 2002:a63:f812:: with SMTP id n18mr8952215pgh.185.1565984662639; Fri, 16 Aug 2019 12:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565984662; cv=none; d=google.com; s=arc-20160816; b=Rcd3MSXomSpRbbRY/MvRMaKqkQ+t8RjTx0KFdOzXIlcX5B+zT71KZM28aAP+BsvnBY OIWEe3n1OW1TIzKZn+u8efG9NcmXp7ndYOk0GOjcJxwvKUMmdNxBjXGcHE5cH/fdNu5T 7rIVquMpyM+SJFGjogCZhlTDDoiUnnHXETfiArVYZ1UwNhY4X2MGh0foTXS1v4q4etrv aJY4py4h70mqhvl30bAp03rtb22+eCsLOBGi5YRzny3YtJ92f5E8ZA5suqsx7+/c/JOh SjIwEqjxXWU+CKuM0MxhkRkOMxAuMBj8XLRizkactMgaJnogbYlg2aTz14R6OBuleWKk sO9Q== 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=BCWgz2Jicsg4VgpsyZJFNN6F+CHauW+dNANtrXqC+5Y=; b=pyQKPfMablATdz6wNJrOMJgFCsLCf3Fd+hBKIJLEYeOouE/xEAZS+llAILogc5coA8 /Hq9+iaxvY+LgntM+klRshi4j4+dcEM0OVQxqjmgSLNnIAT6WrQ0ajbYWiWQ8vrp4bxj 8pQHUlLFGzzKXwwnyNnKD8rsGmPNX7tdtEGbJnvKxdPSiMMmRBF+d1WDekmgX272Seyf cf/MHOUvfxCcYedgWtQR5/RtdAyUrdF6a1VYCqS6AGLEwFz4SBlwl//EWHD4XpzM5shm Mn34NukWiLcTtI7rpXHhFyVLcJOztr73mngdZhXkUZdL00sc/l2P2KsS6Wu7E8yCsNqt CGrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="Oic2Yry/"; 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 u19si4445612pgf.531.2019.08.16.12.44.07; Fri, 16 Aug 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="Oic2Yry/"; 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 S1727919AbfHPTnJ (ORCPT + 99 others); Fri, 16 Aug 2019 15:43:09 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:13336 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727900AbfHPTnH (ORCPT ); Fri, 16 Aug 2019 15:43:07 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 16 Aug 2019 12:43:09 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 16 Aug 2019 12:43:06 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 16 Aug 2019 12:43:06 -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; Fri, 16 Aug 2019 19:43:06 +0000 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 16 Aug 2019 19:43:06 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 16 Aug 2019 19:43:06 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.166.126]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 16 Aug 2019 12:43:05 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , , , , , , , , , , , , Subject: [PATCH v9 19/22] soc/tegra: pmc: Configure core power request polarity Date: Fri, 16 Aug 2019 12:42:04 -0700 Message-ID: <1565984527-5272-20-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565984527-5272-1-git-send-email-skomatineni@nvidia.com> References: <1565984527-5272-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=1565984589; bh=BCWgz2Jicsg4VgpsyZJFNN6F+CHauW+dNANtrXqC+5Y=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=Oic2Yry/pTEEI/AJvEI3DIhDQB6yhBvyptPtetdgyE761LR117pRkDVvdjlI3wBy9 gcdFMjnVRahumLnjrJ5pZatNCawIbBRO1ZdIly+xGHKTbtuzwHyTVEFLaDCaOOX7ro zQ2DNidahBlQp7cDQYd+sCciqUaR+tTB5FehJSQyN6J0i0MK6HqtMNaDjh7+zMEcpc BesBX7GPg5XG9UotoWdrHYL3kiXasPNQ8hN3QZVG0SSXPMdX20bWI2rc/yY+9/r5k9 j+m6tnNwy1M4AOrtKLy4Htt6U59+rD2xdGGizfgypTbylSZaDyiW5XOUVt8U7SaxIV CDi3JmOVN1ksQ== 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. Reviewed-by: Dmitry Osipenko 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 76e7292ded25..53ed70773872 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