From patchwork Wed Jun 12 07:43:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13694580 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20AC33D388; Wed, 12 Jun 2024 07:43:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178206; cv=none; b=U3K9EtEYSvOKWDqmeBLSGfYibntmHndvKiwPxMe99kMjqXZNCn3itpJmSDlW6P3TLfqQ3Jb45MxHhQfc1Cs0M/WWJB+Be+M3X5/3mJSu4xpmKwdgxI3U/lnA37XNaKAaDAmZxQueYS+rSizn9kuUuYvYGOSkkFdTgRCpdPZKbS0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178206; c=relaxed/simple; bh=2rsptygWifRO/c0OTQta4XS0LqTtMDZVNSsQpMH8z8A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FLbK/IohmGW9z/Ofc+w2qoZJSqNuFQw1lFf4mC4Vkkc6SpDciC/nzlh7UA1oNTZ2cXtJgcbXeCVgItqj94CyFRsG/GtKF9eypB9J+qt1m9MTBY42jvV6wSUmvRGpPdj/K/e7oDVj8CiESZHyhnKDTJy2J2Itizjk0favBafzc/M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=2D5ReFgC; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="2D5ReFgC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718178203; bh=2rsptygWifRO/c0OTQta4XS0LqTtMDZVNSsQpMH8z8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2D5ReFgCJ0rNdPab1qhWShJZEjGyFXubQVbypSqm26hV10K6fOnoNldYMD6Ir5B4l dhCMjArm9ltXzjdeHpguPw2v2UyAy76xgyegFOSHz/rdRkH8suCc5jghYAHa8w1ao6 ESRPhlV+Zt5W+60sq1HDzpbHxXor5LAsKO7NdV4F5zvlFqUvGdZ4VfqAqHi2aH8W6Y cbjJKL3Ft2B5QnPEaNz38u0AdIr6vNnW/0/sgY4+wg+aT9mbcPIWDWwJPsYg1+adMa LorIwLHrd+g4dbAxr+Kf6b35R4UPipa2nxO8g63zgDEsBdQjihbFcLpgOprtotdaao OF7sbDCP+beAQ== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 4E45437820A9; Wed, 12 Jun 2024 07:43:22 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-scsi@vger.kernel.org Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, peter.wang@mediatek.com, jejb@linux.ibm.com, martin.petersen@oracle.com, lgirdwood@gmail.com, broonie@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, michael@walle.cc Subject: [PATCH v5 1/8] scsi: ufs: ufs-mediatek: Remove useless mediatek,ufs-support-va09 property Date: Wed, 12 Jun 2024 09:43:02 +0200 Message-ID: <20240612074309.50278-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> References: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove checking the mediatek,ufs-support-va09 property to decide whether to try to support the VA09 regulator handling and change the ufs_mtk_init_va09_pwr_ctrl() function to make it call devm_regulator_get_optional(): if the regulator is present, then we set the UFS_MTK_CAP_VA09_PWR_CTRL, effectively enabling the handling of the VA09 regulator based on that. Also, make sure to pass the return value of the call to devm_regulator_get_optional() to the probe function, so that if it returns a probe deferral, the appropriate action will be taken. While at it, remove the error print (disguised as info...) when the va09 regulator was not found. Fixes: ac8c2459091c ("scsi: ufs-mediatek: Decouple features from platform bindings") Signed-off-by: AngeloGioacchino Del Regno --- drivers/ufs/host/ufs-mediatek.c | 34 +++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index c7a0ab9b1f59..47c7d34b9be9 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -623,27 +623,38 @@ static void ufs_mtk_init_boost_crypt(struct ufs_hba *hba) return; } -static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) +static int ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) { struct ufs_mtk_host *host = ufshcd_get_variant(hba); + int ret; - host->reg_va09 = regulator_get(hba->dev, "va09"); - if (IS_ERR(host->reg_va09)) - dev_info(hba->dev, "failed to get va09"); - else - host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL; + host->reg_va09 = devm_regulator_get_optional(hba->dev, "va09"); + if (IS_ERR(host->reg_va09)) { + ret = PTR_ERR(host->reg_va09); + + /* Return an error only if this is a deferral */ + if (ret == -EPROBE_DEFER) + return ret; + + return 0; + } + + host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL; + return 0; } -static void ufs_mtk_init_host_caps(struct ufs_hba *hba) +static int ufs_mtk_init_host_caps(struct ufs_hba *hba) { struct ufs_mtk_host *host = ufshcd_get_variant(hba); struct device_node *np = hba->dev->of_node; + int ret; if (of_property_read_bool(np, "mediatek,ufs-boost-crypt")) ufs_mtk_init_boost_crypt(hba); - if (of_property_read_bool(np, "mediatek,ufs-support-va09")) - ufs_mtk_init_va09_pwr_ctrl(hba); + ret = ufs_mtk_init_va09_pwr_ctrl(hba); + if (ret) + return ret; if (of_property_read_bool(np, "mediatek,ufs-disable-ah8")) host->caps |= UFS_MTK_CAP_DISABLE_AH8; @@ -664,6 +675,7 @@ static void ufs_mtk_init_host_caps(struct ufs_hba *hba) host->caps |= UFS_MTK_CAP_RTFF_MTCMOS; dev_info(hba->dev, "caps: 0x%x", host->caps); + return 0; } static void ufs_mtk_scale_perf(struct ufs_hba *hba, bool scale_up) @@ -986,7 +998,9 @@ static int ufs_mtk_init(struct ufs_hba *hba) } /* Initialize host capability */ - ufs_mtk_init_host_caps(hba); + err = ufs_mtk_init_host_caps(hba); + if (err) + goto out; ufs_mtk_init_mcq_irq(hba); From patchwork Wed Jun 12 07:43:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13694581 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83BDB16C451; Wed, 12 Jun 2024 07:43:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178207; cv=none; b=Iua7hh1QvQ2zajlenQ74jMC58vuznaUk+6oWSRsk8fE1ubu49SQbFcCTtoay/0+BwyQAV44isbPekhNRp/7B8GWQbr0MUmlKh/qL9ZNgR71ywjgkZX/2h0wQRTfdJbKXT8qFUXFRiTR/G1pcJnlzcxRkLaR4DVDpSo2J6enYv70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178207; c=relaxed/simple; bh=6lsXc7rT10Ac9XA0NZVkBiPzRFq97QkmLLktkh5oOi4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iPCguzVHVRoI8l5ajjb42767zo9R2fELo6syuUY5PswMjZjZj/NT/MDBQ28MTM6uQgclmjvcGyOdah0LDm28++HP0GBNG7G93nMaSSEKcIFRDajaBVRVUgOwrdZ/ZpQ/wNMc8so0Rp0nG6H/XbheT12dEuCQNULNjubxCHxYy5o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=geZhYr5Q; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="geZhYr5Q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718178204; bh=6lsXc7rT10Ac9XA0NZVkBiPzRFq97QkmLLktkh5oOi4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=geZhYr5QvEFA+deCcJn5kv2L7dxx0xl4Q7/ztkSlnQc0OfrjoCcsFonA6YuWE6uC+ 01wxJsriWa8BtIwB+C0XAjCAaOa5yXuS4+wCcZWtq3b9ssXcnlJkXPZL8snyl1B9i4 /GtFfo9kitkIiQje2NSd+PuFYuf66Jl/ybbFkdXnW5g+eHTcXnnYdJQmRzVaHYenkU o+/oTnJFlgSBrTbCnA2eJyGsd2agQW2uIBP2g+51zUHi970XMA8vLG6tfV1rhY11aP tcTQG6LOZFSwxebLj08iOZUpdVtBjgajo68Mmg57HPhAKDxQt9+JVlh6WUfzEAh/b5 U6ACclK17pNzA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id A811C378216D; Wed, 12 Jun 2024 07:43:23 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-scsi@vger.kernel.org Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, peter.wang@mediatek.com, jejb@linux.ibm.com, martin.petersen@oracle.com, lgirdwood@gmail.com, broonie@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, michael@walle.cc Subject: [PATCH v5 2/8] scsi: ufs: ufs-mediatek: Fix property name for crypt boost voltage Date: Wed, 12 Jun 2024 09:43:03 +0200 Message-ID: <20240612074309.50278-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> References: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Rename "boost-crypt-vcore-min" to "mediatek,boost-crypt-microvolt": this is a vendor specific property and needs the "mediatek," prefix, moreover, this is not defining a minimum voltage per-se; Even if technically a call to regulator_set_voltage() does indeed internally set a VMIN for a regulator, the API also supports other calls to set VMIN-VMAX constraints, so this "vcore-min"->"microvolt" rename is performed in order to avoid confusion, other than adding the "microvolt" suffix to it (as this does take microvolts!). Fixes: 590b0d2372fe ("scsi: ufs-mediatek: Support performance mode for inline encryption engine") Signed-off-by: AngeloGioacchino Del Regno --- drivers/ufs/host/ufs-mediatek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index 47c7d34b9be9..23271eb1a244 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -596,9 +596,9 @@ static void ufs_mtk_init_boost_crypt(struct ufs_hba *hba) goto disable_caps; } - if (of_property_read_u32(dev->of_node, "boost-crypt-vcore-min", + if (of_property_read_u32(dev->of_node, "mediatek,boost-crypt-microvolt", &volt)) { - dev_info(dev, "failed to get boost-crypt-vcore-min"); + dev_info(dev, "failed to get mediatek,boost-crypt-microvolt"); goto disable_caps; } From patchwork Wed Jun 12 07:43:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13694582 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF33716C856; Wed, 12 Jun 2024 07:43:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178209; cv=none; b=ghcsHofhxGtYOOpaJUO+YUFsvaSim+qYeCBaIpifqQJkJ61I0X0HeA9W1fpsTGBsbA+bmsDTbVdk6i28oqWqSuHzzWX77WrSMbdxp7fF1GcU+tDT/PFWYjNJtaLYoREMbrv8ktTX9kyytZmZ5FpOHWWCfJm9jZaNb/QnQoTmfKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178209; c=relaxed/simple; bh=XTxdq7yH2tRPSNAKGFLMAQfypYpTrjvxDfqFeM7tqxw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WQApOQ2Sls11z1ub6C2ncKE3p872kzWWTAQq5m90Hsn3jaV8ra1rKIlaVWf53EA2lrUaXpFSIY8ioUik75632Q6bVnxUjUe004Ji9QPRQbpKAnBaHxNFywwNtQSNxZD6PVPp8O6yd9Zlc1mnelpVE/vfZOq1QMCTbftU1S6KwYk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=P64NqKUr; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="P64NqKUr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718178206; bh=XTxdq7yH2tRPSNAKGFLMAQfypYpTrjvxDfqFeM7tqxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P64NqKUrOcVq8coM8pIRjnqWlRA1bH6e2k9eoFmEXtl9mxjWsCe86QTzUbCfoJZ/E FAMmjlSCeKlz09ggH9hgfJ3SASzr79ABe+Y8YD2t0cSZDHwtZGrGDgk/RUPVASa4yR rizTeMkgmSt7Mrf0/V1hDctVcCR8T61oA88lePsFzdLuz5Wai/qb7JJPq2uS/AF87W F81bJwdRQjb3JdTteRZV+q7osXRZ/aQiOi90Cp4WZ7xKg86hugUJwepcDCHakruuaI 8ag4Ttilq88EwFTgz9QT37tpvge10n3IuckBlYnuTsnFfG7PPq2NvMCNv55UJDxgxu IvFxRVDpzmJiw== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 0C8A7378219A; Wed, 12 Jun 2024 07:43:24 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-scsi@vger.kernel.org Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, peter.wang@mediatek.com, jejb@linux.ibm.com, martin.petersen@oracle.com, lgirdwood@gmail.com, broonie@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, michael@walle.cc Subject: [PATCH v5 3/8] scsi: ufs: ufs-mediatek: Remove useless mediatek,ufs-boost-crypt property Date: Wed, 12 Jun 2024 09:43:04 +0200 Message-ID: <20240612074309.50278-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> References: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is no need to have a property that activates the inline crypto boost feature, as this needs many things: a regulator, three clocks, and the mediatek,boost-crypt-microvolt property to be set. If any one of these is missing, the feature won't be activated, hence, it is useless to have yet one more property to enable that. While at it, also address another two issues: 1. Give back the return value to the caller and make sure to fail probing if we get an -EPROBE_DEFER or -ENOMEM; and 2. Free the ufs_mtk_crypt_cfg structure allocated in the crypto boost function if said functionality could not be enabled because it's not supported, as that'd be only wasted memory. Last but not least, move the devm_kzalloc() call for ufs_mtk_crypt_cfg to after getting the dvfsrc-vcore regulator and the boost microvolt property, as if those fail there's no reason to even allocate that. Fixes: ac8c2459091c ("scsi: ufs-mediatek: Decouple features from platform bindings") Signed-off-by: AngeloGioacchino Del Regno --- drivers/ufs/host/ufs-mediatek.c | 55 ++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index 23271eb1a244..8d0e7ea52541 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -576,51 +576,55 @@ static int ufs_mtk_init_host_clk(struct ufs_hba *hba, const char *name, return ret; } -static void ufs_mtk_init_boost_crypt(struct ufs_hba *hba) +static int ufs_mtk_init_boost_crypt(struct ufs_hba *hba) { struct ufs_mtk_host *host = ufshcd_get_variant(hba); struct ufs_mtk_crypt_cfg *cfg; struct device *dev = hba->dev; struct regulator *reg; u32 volt; - - host->crypt = devm_kzalloc(dev, sizeof(*(host->crypt)), - GFP_KERNEL); - if (!host->crypt) - goto disable_caps; + int ret; reg = devm_regulator_get_optional(dev, "dvfsrc-vcore"); if (IS_ERR(reg)) { - dev_info(dev, "failed to get dvfsrc-vcore: %ld", - PTR_ERR(reg)); - goto disable_caps; + ret = PTR_ERR(reg); + if (ret == -EPROBE_DEFER) + return ret; + + return 0; } - if (of_property_read_u32(dev->of_node, "mediatek,boost-crypt-microvolt", - &volt)) { + ret = of_property_read_u32(dev->of_node, "mediatek,boost-crypt-microvolt", &volt); + if (ret) { dev_info(dev, "failed to get mediatek,boost-crypt-microvolt"); - goto disable_caps; + return 0; } + host->crypt = devm_kzalloc(dev, sizeof(*host->crypt), GFP_KERNEL); + if (!host->crypt) + return -ENOMEM; + cfg = host->crypt; - if (ufs_mtk_init_host_clk(hba, "crypt_mux", - &cfg->clk_crypt_mux)) - goto disable_caps; + ret = ufs_mtk_init_host_clk(hba, "crypt_mux", &cfg->clk_crypt_mux); + if (ret) + goto out; - if (ufs_mtk_init_host_clk(hba, "crypt_lp", - &cfg->clk_crypt_lp)) - goto disable_caps; + ret = ufs_mtk_init_host_clk(hba, "crypt_lp", &cfg->clk_crypt_lp); + if (ret) + goto out; - if (ufs_mtk_init_host_clk(hba, "crypt_perf", - &cfg->clk_crypt_perf)) - goto disable_caps; + ret = ufs_mtk_init_host_clk(hba, "crypt_perf", &cfg->clk_crypt_perf); + if (ret) + goto out; cfg->reg_vcore = reg; cfg->vcore_volt = volt; host->caps |= UFS_MTK_CAP_BOOST_CRYPT_ENGINE; -disable_caps: - return; +out: + if (ret) + devm_kfree(dev, host->crypt); + return 0; } static int ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) @@ -649,8 +653,9 @@ static int ufs_mtk_init_host_caps(struct ufs_hba *hba) struct device_node *np = hba->dev->of_node; int ret; - if (of_property_read_bool(np, "mediatek,ufs-boost-crypt")) - ufs_mtk_init_boost_crypt(hba); + ret = ufs_mtk_init_boost_crypt(hba); + if (ret) + return ret; ret = ufs_mtk_init_va09_pwr_ctrl(hba); if (ret) From patchwork Wed Jun 12 07:43:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13694583 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC4C116D301; Wed, 12 Jun 2024 07:43:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178210; cv=none; b=BAe+Geug82tId+YY2fgajnXDLkUIjil+JnGpmvkRUab2jfoCUftj9Eg5F9s3KV+Df0KlFpLlWf39CJknrJoO2cMjQzK9ZyIRh2TCOYm8jvQ+WorgDaqkGiFliEAe6hvy4wCXEB+ru7dZvdj4DfK3nP+NcANG2wGSDcgszKkkAJo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178210; c=relaxed/simple; bh=K9MBVzw8pOo1gyqCI5gTzX5FvDaBQEiToN0XXU2CLjY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Iqin+XKMpu6fIIbiyvIPjnc90uPFCh2xc7r455PTiklrAl0P1sA8o+CKfAYrZSzymm6W4ymSPLXeL/OxBoVJ+nRQ+Sw1MtP9QGi9a686Z5Ru0YLIpY54dhRcOCsyEKsyKGCq2BLo16OeN4sCIyePhFy1nRaD+Dxn4Q1HadhSMz8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=eoHZXYnc; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="eoHZXYnc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718178207; bh=K9MBVzw8pOo1gyqCI5gTzX5FvDaBQEiToN0XXU2CLjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eoHZXYncZyQl8K7MWDaJC1sFeWZxHXStMI1HqUfD1Va/32VVj+OxGTeEStnJTIcDS mJLX9np5dQ0zn74aPE9fs6p0BJAz7I8fomj99yIVCEZzZdo7WInMOZ2eNRpEPXZbmG gjaZ66SQehY8Qw24C1Ho5EZwfzYrpryfHrtiXov4hIFYK9Gofvw8GruUGyLa2B4wOp FPqrmFrUpiuH4NntZgI50fnAMnunJOkXq9FbKXiIv8nmVPa7Sy2267ELCXDZykVYJg ZnLQBkvtge9Qemf+TwEzXFRFFIj6KzFmc0Khitl75Zjg7a5U2mYJtBSNxyycBm3Kz5 GhLzEyB5dd0Dg== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 677DB378219B; Wed, 12 Jun 2024 07:43:26 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-scsi@vger.kernel.org Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, peter.wang@mediatek.com, jejb@linux.ibm.com, martin.petersen@oracle.com, lgirdwood@gmail.com, broonie@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, michael@walle.cc Subject: [PATCH v5 4/8] scsi: ufs: ufs-mediatek: Avoid underscores in crypt clock names Date: Wed, 12 Jun 2024 09:43:05 +0200 Message-ID: <20240612074309.50278-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> References: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Change all of crypt_{mux,lp,perf} clock names to crypt-{mux,lp-perf}: retaining compatibility with the old names is ignored as there is no user of this driver declaring any of those clocks, and the binding also doesn't allow these ones at all. Fixes: 590b0d2372fe ("scsi: ufs-mediatek: Support performance mode for inline encryption engine") Signed-off-by: AngeloGioacchino Del Regno --- drivers/ufs/host/ufs-mediatek.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index 8d0e7ea52541..10a550e7e628 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -605,15 +605,15 @@ static int ufs_mtk_init_boost_crypt(struct ufs_hba *hba) return -ENOMEM; cfg = host->crypt; - ret = ufs_mtk_init_host_clk(hba, "crypt_mux", &cfg->clk_crypt_mux); + ret = ufs_mtk_init_host_clk(hba, "crypt-mux", &cfg->clk_crypt_mux); if (ret) goto out; - ret = ufs_mtk_init_host_clk(hba, "crypt_lp", &cfg->clk_crypt_lp); + ret = ufs_mtk_init_host_clk(hba, "crypt-lp", &cfg->clk_crypt_lp); if (ret) goto out; - ret = ufs_mtk_init_host_clk(hba, "crypt_perf", &cfg->clk_crypt_perf); + ret = ufs_mtk_init_host_clk(hba, "crypt-perf", &cfg->clk_crypt_perf); if (ret) goto out; From patchwork Wed Jun 12 07:43:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13694584 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8689C16D33D; Wed, 12 Jun 2024 07:43:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178212; cv=none; b=HaXCYy4XsuPaVMphhziqtz1c8wlIDfdBCVSl9iPLx3WPJnqH1o9Qs1cn+5nTM0qt2yX1AVlaMx/idfszri5H2R88c9hmy5Q06vguhaMJfN8Lbr2avc1iChgOwZ2g8AcEc3lGYZrh/LO8103L5vqN/f2u7RVHzODMix+CoEVZKB8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178212; c=relaxed/simple; bh=K3rrJEbp/p/hbKG0ZLHrE2fpo1wxhHU8XVuRFaDmjOY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gX+ED+IT3x+cpfvqU7Hkhotx2JCXTFebJ40VZ3VnQj2H28t0C2Bo7lfl6pYhxiVe2CT1n4ScRuiljuAfOXdbF3QdncxP4W0ASOWLsKAL+5H/rVACilZx4ZJusA8O7spvONm2U/ChVx1VIru4Yup3uC5GJiANz3Kg1rGr8yaMmiQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=I3OdBZ2w; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="I3OdBZ2w" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718178208; bh=K3rrJEbp/p/hbKG0ZLHrE2fpo1wxhHU8XVuRFaDmjOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I3OdBZ2w/fBbDobKQTv1ae1lqa+mQz8L/SUhkySAJAy8RsWFdCKI8pDAAsDfsRaws rXgNa69ya52w59XML8sVH5uCNkN3Fa+aCa4JxiCZD0quikLsXqfsb8wTGseHgltn63 2biAdVUJxNfAVSAEOYDFi9afgOwJeGsHAYFnsyR0tgyQK4Vnc2MvCw3ddeROsyrLdz sRU5anUYuzeNzLmMpvjnK3QY9u9dB0h90uHjMuQ3NqwII+oQz3n2/J5o2uwB57Ibgx O7+lH+icpWBTMwa5zg+K8ZKacs/kxF0ER3kOL48FazOTtHivXhgJYETjkY6LXeb/FN N3Y/Agoe/sI8A== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id B2D3B378219E; Wed, 12 Jun 2024 07:43:27 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-scsi@vger.kernel.org Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, peter.wang@mediatek.com, jejb@linux.ibm.com, martin.petersen@oracle.com, lgirdwood@gmail.com, broonie@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, michael@walle.cc, Conor Dooley Subject: [PATCH v5 5/8] dt-bindings: ufs: mediatek,ufs: Document MT8192 compatible with MT8183 Date: Wed, 12 Jun 2024 09:43:06 +0200 Message-ID: <20240612074309.50278-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> References: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The MT8192 UFS controller is compatible with the MT8183 one: document this by allowing to assign both compatible strings "mediatek,mt8192-ufshci", "mediatek,mt8183-ufshci" to the UFSHCI node. Moreover, since no MT8192 devicetree ever declared any UFSHCI node, disallow specifying only the MT8192 compatible. In preparation for adding MT8195 to the mix, the MT8192 compatible was added as enum instead of const. Also, while at it, replace Stanley Chu with me in the maintainers field, as he is unreachable and his email isn't active anymore. Acked-by: Conor Dooley Signed-off-by: AngeloGioacchino Del Regno --- .../devicetree/bindings/ufs/mediatek,ufs.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml index 32fd535a514a..f14887ea6fdc 100644 --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml @@ -7,16 +7,19 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Mediatek Universal Flash Storage (UFS) Controller maintainers: - - Stanley Chu + - AngeloGioacchino Del Regno allOf: - $ref: ufs-common.yaml properties: compatible: - enum: - - mediatek,mt8183-ufshci - - mediatek,mt8192-ufshci + oneOf: + - const: mediatek,mt8183-ufshci + - items: + - enum: + - mediatek,mt8192-ufshci + - const: mediatek,mt8183-ufshci clocks: maxItems: 1 From patchwork Wed Jun 12 07:43:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13694585 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E910A16D4E2; Wed, 12 Jun 2024 07:43:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178213; cv=none; b=TAO3KZyoxTGIP4CU/prAhN/fWCCpvLrGSg9+kGduVo5hslpJyDjR7AiYmcWRD+ejaoYBqlYiM1XxjNwKNEbXodnX3AQFAI28cNfVJs40FejBvSVmgAW1RptaoqT6KdKacTMYSXz191R7PjR3zHw0OCrBhExzOkQr2935NZBbSLk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178213; c=relaxed/simple; bh=wZcU/FXZehoC+lJtazGBLsIeGgfB53r6HFIFrqTzF24=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FGL1LdSZgmILSPA6ooQU0xjmsuLfq0qBzpqnVN8r77RWWtXbFuz8HVutuyyD39T2MJ8k8a59NnvQg15pDe7L/1UFlJYhUW3uEL796ODHPSSpI74nSBfn9UECbBEAfmZSHiV9Eg4GvwQl5wSmElbKw4jzM5iRryesrd7Uy3KSLGQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=SShfAm4C; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="SShfAm4C" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718178210; bh=wZcU/FXZehoC+lJtazGBLsIeGgfB53r6HFIFrqTzF24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SShfAm4CoYKyVm0t5LhyWvvmUPhukqX1sldqdTI1lFe29jLgV/c7TpAOANcGlHWUg qqMpau0QIPMm4MODw3DRvOMM5KWam0GZaj7l69gwcR9hpdJ6tQ5RojT+ErAiXo5Zgf Ji/DEJl2XkRArxNhoCQibwydpfiZpLJ+2ulw1FpqI9IuZRYvkTmaFlzNzTNHWmZms7 JFo1W3tCLd+pV9EjIcopi0d9lVZl4YcBj/oAE2LZB7fMuc/Qr/zLPOzf80feYe2aki I+D+If4y1qt9g4zkbY01Wsy5bZob9XtWapAkEF6jcojJxmvP5hRHStHhxGQHEWYAUo nm7ow5+awGg2w== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 2420D378219F; Wed, 12 Jun 2024 07:43:29 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-scsi@vger.kernel.org Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, peter.wang@mediatek.com, jejb@linux.ibm.com, martin.petersen@oracle.com, lgirdwood@gmail.com, broonie@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, michael@walle.cc, Conor Dooley Subject: [PATCH v5 6/8] dt-bindings: ufs: mediatek,ufs: Document MT8195 compatible Date: Wed, 12 Jun 2024 09:43:07 +0200 Message-ID: <20240612074309.50278-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> References: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add the new mediatek,mt8195-ufshci string. This SoC's UFSHCI controller is compatible with MT8183. Acked-by: Conor Dooley Signed-off-by: AngeloGioacchino Del Regno --- Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml index f14887ea6fdc..5728e750761f 100644 --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml @@ -19,6 +19,7 @@ properties: - items: - enum: - mediatek,mt8192-ufshci + - mediatek,mt8195-ufshci - const: mediatek,mt8183-ufshci clocks: From patchwork Wed Jun 12 07:43:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13694586 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3546316D9AA; Wed, 12 Jun 2024 07:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178214; cv=none; b=pitdHOuNSsiQetG7R2MtsWCsz8V/rEkQML1JHH3R2IT8Kvl9VUm7cPje/qVekNm58RCdIvFkq8lB08uMUT7tUUgw+v3eTMrWshQacmkRUVm2bpBmfzOVI5lDYTnnKSY4dx9AIFfeUGTr5fJ07+Bx7+CRG5AyNGXQg+EjgM2hmD0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178214; c=relaxed/simple; bh=TLELbug1XiDukFE3ghBiM2MHhoU3imk1/7ngSSox3e8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rlsUTLFhj0FMp1zyjHdk1Csq89/elpEEyFnr1gwAyVyF8WTovEkN8X42MMu1IHVGffCYa9CToUzYDBhhve3lmZ+f/BCIUPIZ3rPddZxxDoUVuRoKCAab7/9Nv2sEt6n4WU6VcTsNHHARo4WafcW/6VT2e+GN/24vE3JFjZcsuEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=crdOBphH; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="crdOBphH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718178211; bh=TLELbug1XiDukFE3ghBiM2MHhoU3imk1/7ngSSox3e8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=crdOBphHW1I1MSSEvItDPGKYnqKmhVSresrVQRvPCzFKRubdocG1dgao4P/A2ny1k vXepq99nP+SEGpD7u4Qe6ULgbJ65lPxx2kzIiwzlSeOLggycIyHHKIm60x9R2oN+8l Y1LIUyK4x1gK1VfoaS9C+BwpymsXZLDQdsqc55muwpFMjDJLhhflA9wbUCZgtbV9ch tUX/fiR9oCg4OeDMxloh6NL4bJ0Y5Dd3Wv2WjoaHfMHYEeFgSjvH11Z/fOrLPwcBqy RMGjrvraJLszwuX+cpDJzGtMon/AnmNN4Edi1x0sjUlYFo+RBGrQ4XZS9zjrk5IzyG 3pYC5M9LxIMew== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 878EF37821A0; Wed, 12 Jun 2024 07:43:30 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-scsi@vger.kernel.org Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, peter.wang@mediatek.com, jejb@linux.ibm.com, martin.petersen@oracle.com, lgirdwood@gmail.com, broonie@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, michael@walle.cc, Conor Dooley Subject: [PATCH v5 7/8] dt-bindings: ufs: mediatek,ufs: Document additional clocks Date: Wed, 12 Jun 2024 09:43:08 +0200 Message-ID: <20240612074309.50278-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> References: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add additional clocks, used on all MediaTek SoCs' UFSHCI controllers: some of these clocks are optional and used only for scaling purposes to save power, or to improve performance in the case of the crypt clocks. Acked-by: Conor Dooley Signed-off-by: AngeloGioacchino Del Regno --- .../devicetree/bindings/ufs/mediatek,ufs.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml index 5728e750761f..1df8779ee902 100644 --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml @@ -23,11 +23,24 @@ properties: - const: mediatek,mt8183-ufshci clocks: - maxItems: 1 + minItems: 1 + maxItems: 12 clock-names: + minItems: 1 items: - const: ufs + - const: ufs-aes + - const: ufs-tick + - const: unipro-sys + - const: unipro-tick + - const: ufs-sap + - const: ufs-tx-symbol + - const: ufs-rx-symbol + - const: ufs-mem + - const: crypt-mux + - const: crypt-lp + - const: crypt-perf phys: maxItems: 1 From patchwork Wed Jun 12 07:43:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13694587 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 866FC16D9CA; Wed, 12 Jun 2024 07:43:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178215; cv=none; b=usV9lDwD0IjmSiHReO5SRCNOhm6YC8+s+HF3OYtIZX4LgoLQmaxs/5Q49ofXUxME5WehH09OCjAeaXmJjP9GKt+RoIYuK7rRvJz5NbUBPPm4v7hh6Kd9p7xZAO1u6+Lh8SaIAo+Ld38h9dRF6fZf1Bc8SeaOFHKHc/muJAdPbdo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718178215; c=relaxed/simple; bh=06ggiwhMyGPpOHXWaG3DQjMS63EfxHCPMMxtiCYkegg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kBHzqc/5Yka11SroBuEHndXLz531SNbGUIzqiRbHRQY0rGqkNVZcp4U/mUt0VwzI3Rks2/O1TfNY+7GpEi7JNi+aNpQz8Gsut0di9UpWX0YRirYQoI3Ki+Qj8ZgCvDk9osCpZlCFJPjHRZyfCVvGVoHc3BB8VjTP+HE8ra4+vug= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=MzKAVqVw; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="MzKAVqVw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718178213; bh=06ggiwhMyGPpOHXWaG3DQjMS63EfxHCPMMxtiCYkegg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MzKAVqVwijk6mkNDVISGI0yOnt+0W/Gauxmgj64UBq12mPbsLQrt2lKDe+eey6KAF 4UZBr1kAdNv2VItZowPljl2vf3G8WxVZ3N1jFB3LZG/a2Dz0jS1c8kEcgDn00wDm6x /TU9l1hinejjFoYGockEY7byW1MLeKsPFJxltG5y5lJKdiqbyp7Qkg6sy0WU8/arjF 6FknBeVwH+/5s2FInK9Qe+80nTOJbk3RPwR4fLkOSkuZtr9sRcX0AY639NgAVdmZxs lfymeH25kLKEDoL6hlOl+2+3k0G51Ph3rydvNHFtuF2TwZXVfx2oKkPWATWFlxVIUZ 8wWlbiWeoK3Xw== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id EBF2F37821A3; Wed, 12 Jun 2024 07:43:31 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-scsi@vger.kernel.org Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, peter.wang@mediatek.com, jejb@linux.ibm.com, martin.petersen@oracle.com, lgirdwood@gmail.com, broonie@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, michael@walle.cc, Conor Dooley Subject: [PATCH v5 8/8] dt-bindings: ufs: mediatek,ufs: Document optional dvfsrc/va09 regulators Date: Wed, 12 Jun 2024 09:43:09 +0200 Message-ID: <20240612074309.50278-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> References: <20240612074309.50278-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Document the optional dvfsrc-vcore and va09 regulators used for, respectively, crypt boost and internal MPHY power management in when powering on/off the (external) MediaTek UFS PHY. Acked-by: Conor Dooley Signed-off-by: AngeloGioacchino Del Regno --- Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml index 1df8779ee902..b74a2464196d 100644 --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml @@ -48,6 +48,8 @@ properties: reg: maxItems: 1 + dvfsrc-vcore-supply: true + va09-supply: true vcc-supply: true required: