Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1451110pxu; Thu, 17 Dec 2020 10:12:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyo/eUd/IIqWZgRx0JCwzTRPRMqcOSaPZmztU1fbyb2NFZTGAj8KYhPCXRCWsCjAPf6shjW X-Received: by 2002:a50:ab51:: with SMTP id t17mr594568edc.89.1608228735861; Thu, 17 Dec 2020 10:12:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608228735; cv=none; d=google.com; s=arc-20160816; b=A7luQcatgbBGTvYmnf2G9D9ZFr6PwV4wc0wYuNuUjPYDWivQp1ymJ4/EnOSs8QzdHN 20d/mEK8Q/UIzAAxkDdVEq9RYEOBk8HR1s4DkerB6URm2CgIpA0XWVDvcjhISkPgLfpI 4OFhbGam4dpxOunYYmqCzR2FYR/QTTAy2VObCVKYMBKngeFwzg7eiYTQRa/HyuXVpZpX PZW5w6fu3pmTtLdazEebmaThTO4FSrqk4j07Aq8LuvDmhuga6OvenSkZLGjgYUTfTgD5 5A5Td2MLrKgUf1dC4o8rOwkio0bQkGe00ntkuKJHgvWVv2bTwZoxzhK3egZvaE8Gbylg vz+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PvpcuwVOPMLvQDnLlBwHPl2O7D8LMz4lLmWlObCh8qc=; b=JGXVV5OZFVa776pu8M+dI3VMQJGwPiif9f+dwNat+IrwsxwOcq5KdyBNymjQLeAQgp I6Rb0DfPnBxiF0FyBxJASR9D6ee4HExzbpeMQDw9SjwmCHZAiRtbDxJSInHLWxyAI7cC Nme5aEu8BK6wcDSdB/cHh5btK7ZCW61Fjo3y0f87a9CuypgawJ7VlH8j9H4ZZV0jU+f/ Pztwz0V0l0KXnF3NFtIBiU8zHj4EpanutHaqklC2VzR+ehqqSG0bsHwPxOHm2HVPxtB2 u3nTAExOjHMC60si0adkLPlnBv+Sm4TCEc7AHQxlSM+nrM3NdLqBvfzBny6epC9GqGa7 MZ2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QON1Gl9s; 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 b11si4668734edw.463.2020.12.17.10.11.52; Thu, 17 Dec 2020 10:12:15 -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=QON1Gl9s; 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 S1731373AbgLQSJe (ORCPT + 99 others); Thu, 17 Dec 2020 13:09:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731125AbgLQSJW (ORCPT ); Thu, 17 Dec 2020 13:09:22 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12F5EC0619DB; Thu, 17 Dec 2020 10:07:48 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id m25so59780833lfc.11; Thu, 17 Dec 2020 10:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PvpcuwVOPMLvQDnLlBwHPl2O7D8LMz4lLmWlObCh8qc=; b=QON1Gl9s1kkROvQY9whWnwGgcnaB4YIR1fgk8dSyGOoCf7hTlJgAN9HZsgUyD+dKDe 3q5wAqAi82gbM8t3Kg60W2QZvCqEJ4mZCkWVxXXUsHSy6meM8yVP2/afMaiKrpyx4gZO /zjzP5nmXt88kR7btX7zCTEao3FMB2pXwQXGXx4Fe1t/7t81y7lIgIMKsoJ7qHrvQtpw BA/UP6RzIbd2R9fpk+APa1SZfRIaSGEN9q/0joRs/GfYdpL0EBRFqNkY9DjaQIrww6eB 6AfE7k+LCj8fUbWfERHHDHMMRLHabE/QJBtxHTsCbNF8/r9FazasHiPJgwj5/7QgpoEO WSjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PvpcuwVOPMLvQDnLlBwHPl2O7D8LMz4lLmWlObCh8qc=; b=Mr0RtMQEq1NxAKhD371Yb0b1udNSg1oqICqc9Wb8eVBfnhmbQi+445tc5pAedcqujl NOmxzH3m8GyJuIn9mSrrpITOcWKhmfonJoBsvVuxbN7fEh1qh4hXEknf1Qts1BK1wk5d vjEeb7AqsaZpIb4S7lfHj5OqB/H9ZwoH1Vgk+GymvkHv0Pslk5wM5ASaF42mJ6Nu1EEr vdsl19OUusH5eXKPS9DKL5MioTY6hqLFICvWqz91JnUXkxPHz/zNdWc0oU8BBExFJ2Jc XORFOPjwiYCblt9CM3J+rgRyR6DkkPEyWrdEbbEzjqqMNhX+FLDynEUT95k8UpXz9+kR dh7A== X-Gm-Message-State: AOAM531hbZVT91IFzkMtB+l7Ev1b5eWwytpBbV2tjjyXBjxd7tjmm6KZ 4Dn47ui6cuXTIcPN51rDZzo= X-Received: by 2002:a2e:8e63:: with SMTP id t3mr233593ljk.88.1608228466606; Thu, 17 Dec 2020 10:07:46 -0800 (PST) Received: from localhost.localdomain (109-252-192-57.dynamic.spd-mgts.ru. [109.252.192.57]) by smtp.gmail.com with ESMTPSA id u5sm655596lff.78.2020.12.17.10.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 10:07:46 -0800 (PST) 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 Subject: [PATCH v2 23/48] soc/tegra: pmc: Pulse resets after removing power clamp Date: Thu, 17 Dec 2020 21:06:13 +0300 Message-Id: <20201217180638.22748-24-digetx@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217180638.22748-1-digetx@gmail.com> References: <20201217180638.22748-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) -- 2.29.2