Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3729877pxb; Mon, 24 Jan 2022 16:32:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRdSqh0/eXZ7TfyBlDTxpzBSlQfIFhrVsyEhCEot5+K+ulWzVCU9EeJzi7dqq6P+A+udce X-Received: by 2002:a17:902:ab09:b0:14b:2640:6432 with SMTP id ik9-20020a170902ab0900b0014b26406432mr13702745plb.45.1643070772019; Mon, 24 Jan 2022 16:32:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643070772; cv=none; d=google.com; s=arc-20160816; b=NPuxabmHPa0dm3Mr4AhkYKmipJ8EON8gcQM7Pk2NvmVHwxvp7GIbjIvkHJZekd2Ugx NROOyhXgXa9BBc0lWXRmiq+9WYyqEjb5psm6JEOTMebHTfiW9l8AVFDZ5n1nT7EoTqGr 17+99yOAKPJyERd28NQ/GDTRMee/Y4YH54R8Ow9kKU2bg3lMegtmLQBhLhGpI4Rwj2ye X1Gq+zFvHfufAU6tW0m+PXb3bwTkUwPsFCED0qF/88u74mhykfzFVetnGIPgEfxUyEfX xs4Nn08dshC/16gtx37ILc5Y58ZVqYSVcRucp/N/m+EgdRQ/3nRElubuGZfuFAYsGcIC cWZw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=31o2AbFZg3jJaoE9PX8+aDvzOYTawQ6zzn7/QqZ2OVA=; b=nhHWfrs8uxWWhSt25NZcPuQoNW7i3ShA0d+pM3is01xXLad+A51UCxuMq/Fi4iedI6 mWZKneCSHJYX4DI5oeqWqZMClp3prnr+llj0eKI8SrWu0PHIe0pvgqR6mexGlrbM8i64 l4LaSwlNKZifZ25VdUc3EJX7mNaSnmWD6uXhFo9ttB5z1d2ICoNBpHFcx7oJmAvdZjrk 0hL5CV7JcVMshczwNQIY1f4gZFlwLZg/WAJR1g2pt8DzlHjHgOv2ePCT+dduMRuwlBvz sS72TWXPEklTwgh6Vx/7dJOVqSYeRxxrGjgglokwcstoMfaEJvRjJuZyWKpRH2nyZTRy 2gAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W39tyQoX; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si14250329pgl.702.2022.01.24.16.32.39; Mon, 24 Jan 2022 16:32:52 -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=@linuxfoundation.org header.s=korg header.b=W39tyQoX; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3410841AbiAYAab (ORCPT + 99 others); Mon, 24 Jan 2022 19:30:31 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:44990 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1454296AbiAXVcL (ORCPT ); Mon, 24 Jan 2022 16:32:11 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C4CBDB81243; Mon, 24 Jan 2022 21:32:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7B0EC340E5; Mon, 24 Jan 2022 21:32:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059929; bh=fXl+KhFkFNVvhrHdnsaC4Mi8oIwGhOlNMCYqYf9MWAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W39tyQoXMDCNKjzUemHzN0lfVs5toboe4putFKZIOkm7drpJiN26tcEH/KF8umoJL UyMCPElxLtjOUSSRSzF1R3jZZW1OE+U0HUJFPLtkjYyezVGKcd7Zax0lRYOZBs1r7e fjU7+SuNjLLD5lSNiqkS+ARhnyFPdXu1J4hgRwH0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qizhong Cheng , Jianjun Wang , Lorenzo Pieralisi , Tzung-Bi Shih , Matthias Brugger , Sasha Levin Subject: [PATCH 5.16 0782/1039] PCI: mediatek-gen3: Disable DVFSRC voltage request Date: Mon, 24 Jan 2022 19:42:51 +0100 Message-Id: <20220124184151.571970380@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jianjun Wang [ Upstream commit ab344fd43f2958726d17d651c0cb692c67dca382 ] When the DVFSRC (dynamic voltage and frequency scaling resource collector) feature is not implemented, the PCIe hardware will assert a voltage request signal when exit from the L1 PM Substates to request a specific Vcore voltage, but cannot receive the voltage ready signal, which will cause the link to fail to exit the L1 PM Substates. Disable DVFSRC voltage request by default, we need to find a common way to enable it in the future. Link: https://lore.kernel.org/r/20211015063602.29058-1-jianjun.wang@mediatek.com Fixes: d3bf75b579b9 ("PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192") Tested-by: Qizhong Cheng Signed-off-by: Jianjun Wang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Tzung-Bi Shih Reviewed-by: Matthias Brugger Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-mediatek-gen3.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c index 17c59b0d6978b..21207df680ccf 100644 --- a/drivers/pci/controller/pcie-mediatek-gen3.c +++ b/drivers/pci/controller/pcie-mediatek-gen3.c @@ -79,6 +79,9 @@ #define PCIE_ICMD_PM_REG 0x198 #define PCIE_TURN_OFF_LINK BIT(4) +#define PCIE_MISC_CTRL_REG 0x348 +#define PCIE_DISABLE_DVFSRC_VLT_REQ BIT(1) + #define PCIE_TRANS_TABLE_BASE_REG 0x800 #define PCIE_ATR_SRC_ADDR_MSB_OFFSET 0x4 #define PCIE_ATR_TRSL_ADDR_LSB_OFFSET 0x8 @@ -297,6 +300,11 @@ static int mtk_pcie_startup_port(struct mtk_pcie_port *port) val &= ~PCIE_INTX_ENABLE; writel_relaxed(val, port->base + PCIE_INT_ENABLE_REG); + /* Disable DVFSRC voltage request */ + val = readl_relaxed(port->base + PCIE_MISC_CTRL_REG); + val |= PCIE_DISABLE_DVFSRC_VLT_REQ; + writel_relaxed(val, port->base + PCIE_MISC_CTRL_REG); + /* Assert all reset signals */ val = readl_relaxed(port->base + PCIE_RST_CTRL_REG); val |= PCIE_MAC_RSTB | PCIE_PHY_RSTB | PCIE_BRG_RSTB | PCIE_PE_RSTB; -- 2.34.1