From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2105C624DC for ; Tue, 1 Sep 2026 15:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4+SIAaR99aVlgjDUNvb7Sdtapf3BNgO4MfCgI3oYuCo=; b=4VzqrRGCkosIxDBErCH+wvR37M jUegQ8w49wPFTNvG7yZfqN/pjMKnXyICoZLlOUlARzycd+KwRFBNAHuVlmg/BstpHzBfSsoCqwJ6E MYuedCBQZMzyiZSTYJOuyHl5+wj/4ZNYG3IxZRlu0GKJ6AJVmzrHclRs1hWm/OlYH3lJv2BZVdY41 QrWf2TYzaTe5fiB0qTCoWBRexqgknz1WRaN/NgHoukun0eZzFiVaEH6o1snllLXAThPo4A6MWj9pm iOXPUJ/XpK6BBep5jAmSbFVx11I5JMJnfehQotNgX+tWUm/h8pkZ4coAITsXiS9AwtzJA27cteQ6t 0yxgbj6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x1Qao-0000000CYV0-20YJ; Tue, 01 Sep 2026 15:40:10 +0000 Received: from bali.collaboradmins.com ([148.251.105.195]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x1QaW-0000000CXbQ-0QS3; Tue, 01 Sep 2026 15:39:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1788277190; bh=y85pYnKepa77f2Plvw4NLDwYXjkUyv1QpPtNlIpMN2k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kcWlYoSprVCXRhSq0ruzzQ3g17pp4dAe8a67vupkabAl6hwn4TT1aJi4+47OM9Baz Ks3Chevjjt4PxZ7lGbu6ExNWGNzha1drCqkGsTB0avEdLwM3yKP35oHMmk1PisyNPo iuQSBItrrFcCXHZjPtKw1IlhWhKE8t2/qxxCE4m5zyM4LybmryRGurkrfhz4ZczY12 HwLXkKE8r2JfBRXvOgl5OPMiwxY4BV9KKlSslx4TGS4YRLfSOXMlxryKP2IWOCdT9t XmIdZpnauuu2aoVWj2kA2rTmXXCEswiYkSWcGXGVHfewn6lpHPEe2YEmNGC2ge1377 sCR3Opho+gvZw== Received: from yukiji.home (unknown [100.64.0.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: laeyraud) by bali.collaboradmins.com (Postfix) with ESMTPSA id 1C08517E0CAB; Tue, 01 Sep 2026 17:39:49 +0200 (CEST) From: Louis-Alexis Eyraud Date: Tue, 01 Sep 2026 17:39:11 +0200 Subject: [PATCH v11 23/24] scsi: ufs: mediatek: Remove undocumented "clk-scale-up-vcore-min" MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260901-mt8196-ufs-v11-23-dbd007704490@collabora.com> References: <20260901-mt8196-ufs-v11-0-dbd007704490@collabora.com> In-Reply-To: <20260901-mt8196-ufs-v11-0-dbd007704490@collabora.com> To: Chunfeng Yun , Vinod Koul , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Peter Wang , Chaotian Jing , Alim Akhtar , Avri Altman , Bart Van Assche , Stanley Jhu , "James E.J. Bottomley" , Philipp Zabel , Liam Girdwood , Mark Brown , Manivannan Sadhasivam , "Martin K. Petersen" , "Martin K. Petersen" Cc: kernel@collabora.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Nicolas Frattaroli , Louis-Alexis Eyraud X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788277164; l=4256; i=louisalexis.eyraud@collabora.com; s=20250113; h=from:subject:message-id; bh=cdMGv1p/oyG6dnFayeSpjStwQrxuiL5k77cSldPHR1I=; b=CcdGjpLJUq7fZhUpemULkYPjeJXEi7LlgtAJRIgXoYQ8kSBprvpBktOB6ji7H1hSzIHaq+oSD MJy/HZUTTmfCIE4l9434HuVNJyHSH5LnPYPXOxlJ2vrW+1M0XcRSjwI X-Developer-Key: i=louisalexis.eyraud@collabora.com; a=ed25519; pk=CHFBDB2Kqh4EHc6JIqFn69GhxJJAzc0Zr4e8QxtumuM= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260901_083952_473271_06DEC00B X-CRM114-Status: GOOD ( 17.63 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Nicolas Frattaroli The MediaTek UFS driver contains support for an undocumented, non-vendor-prefixed u32 property named "clk-scale-up-vcore-min". Since it is not part of any binding, and would not pass a bindings review in its current form, remove it. To return this functionality, it needs to be resubmitted in a series that also introduces it to the binding, and justifies what it is used for. Compatibility with downstream device trees is not a valid justification for its existence. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nicolas Frattaroli Reviewed-by: Chaotian Jing Signed-off-by: Louis-Alexis Eyraud --- drivers/ufs/host/ufs-mediatek.c | 42 +---------------------------------------- drivers/ufs/host/ufs-mediatek.h | 1 - 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index bcde58e3aee8..a894810a83de 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -909,8 +909,6 @@ static void ufs_mtk_init_clocks(struct ufs_hba *hba) struct ufs_mtk_host *host = ufshcd_get_variant(hba); struct list_head *head = &hba->clk_list_head; struct ufs_clk_info *clki, *clki_tmp; - struct device *dev = hba->dev; - u32 volt; /* * Find private clocks and store them in struct ufs_mtk_clk. @@ -947,24 +945,7 @@ static void ufs_mtk_init_clocks(struct ufs_hba *hba) if (!ufs_mtk_is_clk_scale_ready(hba)) { hba->caps &= ~UFSHCD_CAP_CLK_SCALING; dev_info(hba->dev, "%s: Clock scaling unavailable", __func__); - return; - } - - if (!host->reg_vcore) - return; - - if (of_property_read_u32(dev->of_node, "clk-scale-up-vcore-min", - &volt)) { - dev_info(dev, "failed to get clk-scale-up-vcore-min"); - return; } - - host->mclk.vcore_volt = volt; - - /* If default boot is max gear, request vcore */ - if (volt && host->clk_scale_up) - if (regulator_set_voltage(host->reg_vcore, volt, INT_MAX)) - dev_err(hba->dev, "Failed to set vcore to %d\n", volt); } static void ufs_mtk_setup_clk_gating(struct ufs_hba *hba) @@ -1956,8 +1937,7 @@ static void _ufs_mtk_clk_scale(struct ufs_hba *hba, bool scale_up) struct ufs_mtk_clk *mclk = &host->mclk; struct ufs_clk_info *clki = mclk->ufs_sel_clki; struct ufs_clk_info *fde_clki = mclk->ufs_fde_clki; - int volt, ret = 0; - bool clk_bind_vcore = false; + int ret = 0; bool clk_fde_scale = false; if (!hba->clk_scaling.is_initialized) @@ -1966,10 +1946,6 @@ static void _ufs_mtk_clk_scale(struct ufs_hba *hba, bool scale_up) if (!clki || !fde_clki) return; - volt = host->mclk.vcore_volt; - if (host->reg_vcore && volt) - clk_bind_vcore = true; - if (mclk->ufs_fde_max_clki && mclk->ufs_fde_min_clki) clk_fde_scale = true; @@ -1990,14 +1966,6 @@ static void _ufs_mtk_clk_scale(struct ufs_hba *hba, bool scale_up) } if (scale_up) { - if (clk_bind_vcore) { - ret = regulator_set_voltage(host->reg_vcore, volt, INT_MAX); - if (ret) { - dev_err(hba->dev, "Failed to set vcore to %d\n", volt); - goto out; - } - } - ret = clk_set_parent(clki->clk, mclk->ufs_sel_max_clki->clk); if (ret) { dev_err(hba->dev, "%s: Failed to set clock mux: %pe\n", @@ -2029,14 +1997,6 @@ static void _ufs_mtk_clk_scale(struct ufs_hba *hba, bool scale_up) __func__, ERR_PTR(ret)); goto out; } - - if (clk_bind_vcore) { - ret = regulator_set_voltage(host->reg_vcore, 0, INT_MAX); - if (ret) { - dev_err(hba->dev, "%s: Failed to set vcore to minimum: %pe\n", - __func__, ERR_PTR(ret)); - } - } } out: diff --git a/drivers/ufs/host/ufs-mediatek.h b/drivers/ufs/host/ufs-mediatek.h index 1fa14a83e8cd..4966aae5bd34 100644 --- a/drivers/ufs/host/ufs-mediatek.h +++ b/drivers/ufs/host/ufs-mediatek.h @@ -154,7 +154,6 @@ struct ufs_mtk_clk { struct ufs_clk_info *ufs_fde_clki; /* Mux */ struct ufs_clk_info *ufs_fde_max_clki; /* Max src */ struct ufs_clk_info *ufs_fde_min_clki; /* Min src */ - int vcore_volt; }; struct ufs_mtk_hw_ver { -- 2.55.0