From patchwork Mon Mar 6 17:08:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lux Aliaga X-Patchwork-Id: 659667 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF578C6FA99 for ; Mon, 6 Mar 2023 17:22:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229754AbjCFRWH (ORCPT ); Mon, 6 Mar 2023 12:22:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjCFRWE (ORCPT ); Mon, 6 Mar 2023 12:22:04 -0500 Received: from amity.mint.lgbt (vmi888983.contaboserver.net [149.102.157.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D864B4D60B for ; Mon, 6 Mar 2023 09:21:32 -0800 (PST) Received: from amity.mint.lgbt (mx.mint.lgbt [127.0.0.1]) by amity.mint.lgbt (Postfix) with ESMTP id 4PVlRH0zgJz1S5K8 for ; Mon, 6 Mar 2023 12:08:58 -0500 (EST) Authentication-Results: amity.mint.lgbt (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=mint.lgbt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mint.lgbt; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:subject:to:from; s=dkim; t=1678122537; x=1678986538; bh=XBMOf7rDZmk1/gq6Hnv29VSjIdHlkH5Ie/sn9RbtUDE=; b= SBLHlIZHp18TF8XEMfqxRVYUtBJ8qLg3S1zwWYUHk3/1VlWgP5VBKUhx2FOcNObe NKPSq0pEBnqPVpEu5hfCaNZskZ9huTSWKm2nE6PbIkK5H9r6GoTV8nttG5Z1k/W8 vU2/KUzNaTASQ48/WQMRavNv6QfFgC5ytJt2hLqG+Msx1kpjDOcAY8AXTnPFoa/E I81JWFq9fu7PjXv+TugiI5IBF27GhPX1w6VIBdK8dp0gDZjDclyF1P5nfeyVcaA1 i2XNs34AUdH0JpxREVX5t+j1+FEvws+YP93uj4NdXoz5QREYVqIpJ45Z6mQalNnQ AL4udljajE26cFNUKTS85w== X-Virus-Scanned: amavisd-new at amity.mint.lgbt Received: from amity.mint.lgbt ([127.0.0.1]) by amity.mint.lgbt (amity.mint.lgbt [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zMMokwrpVhXf for ; Mon, 6 Mar 2023 12:08:57 -0500 (EST) Received: from dorothy.. (unknown [186.105.8.42]) by amity.mint.lgbt (Postfix) with ESMTPSA id 4PVlR46j1Tz1S5Jl; Mon, 6 Mar 2023 12:08:48 -0500 (EST) From: Lux Aliaga To: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, kishon@kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com Cc: ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-scsi@vger.kernel.org, linux-hardening@vger.kernel.org, phone-devel@vger.kernel.org, martin.botka@somainline.org, marijn.suijten@somainline.org, Lux Aliaga Subject: [PATCH v7 3/6] phy: qcom-qmp: Add SM6125 UFS PHY support Date: Mon, 6 Mar 2023 14:08:13 -0300 Message-Id: <20230306170817.3806-4-they@mint.lgbt> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306170817.3806-1-they@mint.lgbt> References: <20230306170817.3806-1-they@mint.lgbt> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The SM6125 UFS PHY is compatible with the one from SM6115. Add a compatible for it and modify the config from SM6115 to make them compatible with the SC8280XP binding Signed-off-by: Lux Aliaga Reviewed-by: Martin Botka --- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index 318eea35b972..44c29fdfc551 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -620,6 +620,13 @@ static const char * const qmp_phy_vreg_l[] = { "vdda-phy", "vdda-pll", }; +static const struct qmp_ufs_offsets qmp_ufs_offsets_v3_660 = { + .serdes = 0, + .pcs = 0xc00, + .tx = 0x400, + .rx = 0x600, +}; + static const struct qmp_ufs_offsets qmp_ufs_offsets_v5 = { .serdes = 0, .pcs = 0xc00, @@ -693,6 +700,8 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = { static const struct qmp_phy_cfg sm6115_ufsphy_cfg = { .lanes = 1, + .offsets = &qmp_ufs_offsets_v3_660, + .serdes_tbl = sm6115_ufsphy_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(sm6115_ufsphy_serdes_tbl), .tx_tbl = sm6115_ufsphy_tx_tbl, @@ -1172,6 +1181,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = { }, { .compatible = "qcom,sm6115-qmp-ufs-phy", .data = &sm6115_ufsphy_cfg, + }, { + .compatible = "qcom,sm6125-qmp-ufs-phy", + .data = &sm6115_ufsphy_cfg, }, { .compatible = "qcom,sm6350-qmp-ufs-phy", .data = &sdm845_ufsphy_cfg,