Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10605958pxu; Wed, 30 Dec 2020 06:58:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzufSwYdEzPJx8nBVqLzIrTvt56z/JEaL2Xsz6FpQldzkWnsnENSTOPSOlkkhcZjZQtC78o X-Received: by 2002:a17:906:9613:: with SMTP id s19mr49915633ejx.351.1609340288397; Wed, 30 Dec 2020 06:58:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609340288; cv=none; d=google.com; s=arc-20160816; b=cbDZfKb/0E/ZMFrfO9GLc+cWFHSHNDl0UFhLymToHx/Or0XxdI0jphJ1WHFPY4qtHl em4FcPISmJiU5VkOWUSKJzdoNRZIbHPKtU6lAU3C0CpCDVuPtG/UQXYyuUauqsxV3gYg BBXdjyD+sMAqnx7QhIE/MIXDh8F1VXGzL1kSsWsvOZ1+4RRAdETieswBdUNN+D3YeyA+ mE3D7m7ekXdmdiKIWxlovqi8Q39SGQpdIc4BUhI9u9LZRZQInZFgW6c/Q4p57ovxWrVZ NUWdDIOE/bDpu62p8D2NHjHAnz2Pt3hRzUMwfI9m0S2k3zlA2Mo7Bt8g+NKi6QwpWvgb vWfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject:dkim-signature; bh=0U/3l2R/FqwbzeCe0bIFbSAR6mJKbOIzSVkvfhl/Js8=; b=w2J/5zSuF5ST0AU7Z4WgIEN6ntT51vHi9Jdau3aizFHgxV4qcDXfrJfc/0Usoat/Iy sOKUlsULagP+47BgCi+ogvRJvPvkhyns277sG15tnhqnxRXhw9Yi13w7UGTbuKsRzXSe vnPYqzWoh6X+qx5rk8gz9lgudDa3WkhAA+OapD5NttwFjypsMAhE1ib+OlPzCu6bltRi ILQIVQbrj2IX42+Kn2kV3eRob29+WGtoCwLJZB1fog2ZmwpAXyil3cn9CAycePPrk4CE VBCUlHbtkOjFoIbGhNAXiMawbJ1ppe55OX3RoJ8y0cIMDRmEQT9ioT0q3suFKR9qQ/Z4 Yasg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L5HLkr9W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq17si15207080ejc.136.2020.12.30.06.57.44; Wed, 30 Dec 2020 06:58:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L5HLkr9W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726336AbgL3O5O (ORCPT + 99 others); Wed, 30 Dec 2020 09:57:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbgL3O5N (ORCPT ); Wed, 30 Dec 2020 09:57:13 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07CD6C061799; Wed, 30 Dec 2020 06:56:32 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id y19so37997942lfa.13; Wed, 30 Dec 2020 06:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0U/3l2R/FqwbzeCe0bIFbSAR6mJKbOIzSVkvfhl/Js8=; b=L5HLkr9WfhVAUPpunjEjaBQBUl1SlW/zUa5O1VDTRHUBdAxB+/HWrJ8GTcGCsF7mWO jel4JTGI4sJHATbOPY2XRlk82AhD92G5EShm59syyPsbyXRC6CAgoynITJGCI7+lFoOJ +dE+2O9gdBFrC94ljSMv9aR/2vIPUYsetKfpgKpwXYFulpQAA+rX0JUiL9MKb2gPS8g/ a2Gyez6We5e3I87NlBGkD6YUnUjAnV246QogA89sf84uan1KmmQrFDut1Jl3FzZSqVeb j9F6Ep46eJ6oht7szUO90Kq+IKBdD8OA01xvHwsbL0aa7MlsihfPr64TIiKyPGupP+ed DINg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0U/3l2R/FqwbzeCe0bIFbSAR6mJKbOIzSVkvfhl/Js8=; b=j0gHOLHhS3fW8y22SFOyfznt9jQt9sH0M5yOdWkLDgDexC/U4gk09bBhLohCQhK/01 zNgUI1KxQZR8aGSOnW9XIZC4g7J8bfTsO6Ch5uDRKz2JhY54uQWJclftRh9GfMbjnR7u iPBTX4vi+l4EYvYpaaB6a6r3C5MAc9bIfgl7EUvoRu17hE7MK4oeKLzZPfX2aJFx0Y4I p9h+M6Uo7i2XlfrJ31h0i36pjuQFbt+W8sbD7tz8QESn5OB03mAPLMOG/5ayQ1HieRTT ZJf+RR7CQ4QmXDO469b6jdcsKqfmiBsd6duHFUwwVTeBn9GAtHzjlvE40I1HZLw8dCx2 owbQ== X-Gm-Message-State: AOAM531hvJMDBRhXX2AuBhH9o4CBqvYYc/HN85vDrq3pgCq+P9yCXs03 bmr5KJcmXjlv9gQc6QzbN90KVuQl+OM= X-Received: by 2002:a2e:b80c:: with SMTP id u12mr25529775ljo.490.1609340191355; Wed, 30 Dec 2020 06:56:31 -0800 (PST) Received: from [192.168.2.145] (109-252-192-57.dynamic.spd-mgts.ru. [109.252.192.57]) by smtp.googlemail.com with ESMTPSA id u22sm4247296lfu.46.2020.12.30.06.56.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 06:56:30 -0800 (PST) Subject: Re: [PATCH v2 23/48] soc/tegra: pmc: Pulse resets after removing power clamp From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Liam Girdwood , Ulf Hansson , Mauro Carvalho Chehab , Rob Herring , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski , "Rafael J. Wysocki" , Kevin Hilman , Peter De Schrijver , Viresh Kumar , Stephen Boyd , Michael Turquette Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org References: <20201217180638.22748-1-digetx@gmail.com> <20201217180638.22748-24-digetx@gmail.com> Message-ID: Date: Wed, 30 Dec 2020 17:56:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.2 MIME-Version: 1.0 In-Reply-To: <20201217180638.22748-24-digetx@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 17.12.2020 21:06, Dmitry Osipenko пишет: > The GR3D1 hardware unit needs to pulse hardware reset after removing power > clamp, otherwise reset won't be deasserted. Hence give reset a pulse after > removing the clamp. This stayed unnoticed previously because power > management wasn't supported by the 3D driver until recently and all power > gates are usually ungated after bootloader by default. > > Signed-off-by: Dmitry Osipenko > --- > drivers/soc/tegra/pmc.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c > index fd2ba3c59178..985373ce52b1 100644 > --- a/drivers/soc/tegra/pmc.c > +++ b/drivers/soc/tegra/pmc.c > @@ -654,6 +654,14 @@ static int tegra_powergate_power_up(struct tegra_powergate *pg, > > usleep_range(10, 20); > > + /* > + * Some hardware blocks may need a 0->1->0 reset pulse in order > + * to propagate the reset, Tegra30 3D1 is one example. > + */ > + err = reset_control_reset(pg->reset); > + if (err) > + goto powergate_off; > + > if (pg->pmc->soc->needs_mbist_war) > err = tegra210_clk_handle_mbist_war(pg->id); > if (err) > After some more testing, I found that 3D1 is reset properly if its memory client is placed in reset before power domain is turned off. The memory client resetting is completely missed in v2. I'll improve it in v3 and then this PMC workaround-patch won't be needed anymore.