From nobody Tue Dec 16 08:49:23 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 359632F260F; Mon, 15 Dec 2025 12:42:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765802546; cv=none; b=IfRoEThgBo7KyQGO+aNV/EFgWDgNUGjfLUbuZeGsdoYHyE1tI8Ms9lA+oL+NOIF9lTOdKLiCb9huAWwsj3IVtXbl1viP2cl2Ww+lqFjllZfG+XHFQ8x405+BV9y+wRLyg7uNUrrtquDWYDjl1gf0BY404qlIoF0+axj5fKjJQv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765802546; c=relaxed/simple; bh=2bOS5G59VmU3dJ4AsLSiYKgfCGTtDduQoWXurgiIx2Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=n/zuc0sqMHuMdsxvwZzkN10djQcMyQVhH3/p2SH7zaMIWko9CQYV8Ny/SReGkwARbwrMCa55iFZkaIqMKcoim+6LupPXLNUIk5raOlmVBYWVF86VfMzEdGJAAh09yJez1L/i06iHt6puZjmTF+C6CSENTB0tcK04a3vKCr56skk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ce1rmhDi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ce1rmhDi" Received: by smtp.kernel.org (Postfix) with ESMTPS id 9D2CCC2BC86; Mon, 15 Dec 2025 12:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765802545; bh=2bOS5G59VmU3dJ4AsLSiYKgfCGTtDduQoWXurgiIx2Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Ce1rmhDiQaKBl2X2hz2h8/uoYdJOGTgPWbBun9zkC9JTFPDqF15vlv0QOS0Gr/ani 8Mgq5ACTlwjdNJMpOaTsULjAfF423w3vfYTVM8jai8++vkyyiwFLhWWAexw+2E1X50 xlyGy3aDbmham0K07fSSNwIhgZitNWPpoCFmViv2DRYS1dNNJwP91dlzKNma/pzO2l H1Y3TJpWhDa0PCNmOHS2m15uKaei9GGx4104F2w6NRqscbdmom2TBhl42Mm9TAULlB zENXEzTbzeSVmOLmVmH0AizGMnO8jcPKIPoOEEGa32E6sgwIg8L20qiCMQPSh+7EDw PBFfoess31+gg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93254D5B16E; Mon, 15 Dec 2025 12:42:25 +0000 (UTC) From: Xiangxu Yin via B4 Relay Date: Mon, 15 Dec 2025 20:42:01 +0800 Subject: [PATCH v8 05/12] phy: qcom: qmp-usbc: Move reset config into PHY cfg Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251215-add-displayport-support-for-qcs615-platform-v8-5-cbc72c88a44e@oss.qualcomm.com> References: <20251215-add-displayport-support-for-qcs615-platform-v8-0-cbc72c88a44e@oss.qualcomm.com> In-Reply-To: <20251215-add-displayport-support-for-qcs615-platform-v8-0-cbc72c88a44e@oss.qualcomm.com> To: Vinod Koul , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, fange.zhang@oss.qualcomm.com, yongxing.mou@oss.qualcomm.com, li.liu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com, Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Xiangxu Yin X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1765802542; l=3319; i=xiangxu.yin@oss.qualcomm.com; s=20241125; h=from:subject:message-id; bh=eCgwMUdDZVY9fSLD2nPAvwJtYUEUSaUUP4fffLRd95c=; b=bTV1pXY8mbnYha2eURvjNr1+IJV2JO3WKlUOYFvVZKtX2mJV/P0XaCkCxU7YYhH5TMsjhEkme b3Y6Z3cOeaSDRozfkfbtdKefzHD5O/EHOGg4JevO7rJAIm3ViaIugP4 X-Developer-Key: i=xiangxu.yin@oss.qualcomm.com; a=ed25519; pk=F1TwipJzpywfbt3n/RPi4l/A4AVF+QC89XzCHgZYaOc= X-Endpoint-Received: by B4 Relay for xiangxu.yin@oss.qualcomm.com/20241125 with auth_id=542 X-Original-From: Xiangxu Yin Reply-To: xiangxu.yin@oss.qualcomm.com From: Xiangxu Yin The original reset list only works for USB-only PHYs. USB3DP PHYs require different reset names such as "dp_phy", so they need a separate list. Moving reset configuration into qmp_phy_cfg allows per-PHY customization without adding special-case logic in DT parsing. The legacy DT path keeps using the old hardcoded list, while non-legacy paths use cfg->reset_list. Reviewed-by: Dmitry Baryshkov Signed-off-by: Xiangxu Yin --- drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c b/drivers/phy/qualcom= m/phy-qcom-qmp-usbc.c index 2c998803fcda..cff148dc9f01 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c @@ -335,7 +335,8 @@ struct qmp_phy_cfg { int (*configure_dp_phy)(struct qmp_usbc *qmp); int (*calibrate_dp_phy)(struct qmp_usbc *qmp); =20 - /* regulators to be requested */ + const char * const *reset_list; + int num_resets; const struct regulator_bulk_data *vreg_list; int num_vregs; =20 @@ -464,6 +465,8 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg =3D= { .rx_tbl_num =3D ARRAY_SIZE(msm8998_usb3_rx_tbl), .pcs_tbl =3D msm8998_usb3_pcs_tbl, .pcs_tbl_num =3D ARRAY_SIZE(msm8998_usb3_pcs_tbl), + .reset_list =3D usb3phy_reset_l, + .num_resets =3D ARRAY_SIZE(usb3phy_reset_l), .vreg_list =3D qmp_phy_msm8998_vreg_l, .num_vregs =3D ARRAY_SIZE(qmp_phy_msm8998_vreg_l), .regs =3D qmp_v3_usb3phy_regs_layout, @@ -480,6 +483,8 @@ static const struct qmp_phy_cfg qcm2290_usb3phy_cfg =3D= { .rx_tbl_num =3D ARRAY_SIZE(qcm2290_usb3_rx_tbl), .pcs_tbl =3D qcm2290_usb3_pcs_tbl, .pcs_tbl_num =3D ARRAY_SIZE(qcm2290_usb3_pcs_tbl), + .reset_list =3D usb3phy_reset_l, + .num_resets =3D ARRAY_SIZE(usb3phy_reset_l), .vreg_list =3D qmp_phy_sm2290_vreg_l, .num_vregs =3D ARRAY_SIZE(qmp_phy_sm2290_vreg_l), .regs =3D qmp_v3_usb3phy_regs_layout_qcm2290, @@ -496,6 +501,8 @@ static const struct qmp_phy_cfg sdm660_usb3phy_cfg =3D { .rx_tbl_num =3D ARRAY_SIZE(sdm660_usb3_rx_tbl), .pcs_tbl =3D qcm2290_usb3_pcs_tbl, .pcs_tbl_num =3D ARRAY_SIZE(qcm2290_usb3_pcs_tbl), + .reset_list =3D usb3phy_reset_l, + .num_resets =3D ARRAY_SIZE(usb3phy_reset_l), .vreg_list =3D qmp_phy_msm8998_vreg_l, .num_vregs =3D ARRAY_SIZE(qmp_phy_msm8998_vreg_l), .regs =3D qmp_v3_usb3phy_regs_layout_qcm2290, @@ -512,6 +519,8 @@ static const struct qmp_phy_cfg qcs615_usb3phy_cfg =3D { .rx_tbl_num =3D ARRAY_SIZE(qcm2290_usb3_rx_tbl), .pcs_tbl =3D qcm2290_usb3_pcs_tbl, .pcs_tbl_num =3D ARRAY_SIZE(qcm2290_usb3_pcs_tbl), + .reset_list =3D usb3phy_reset_l, + .num_resets =3D ARRAY_SIZE(usb3phy_reset_l), .vreg_list =3D qmp_phy_qcs615_vreg_l, .num_vregs =3D ARRAY_SIZE(qmp_phy_qcs615_vreg_l), .regs =3D qmp_v3_usb3phy_regs_layout_qcm2290, @@ -1051,8 +1060,7 @@ static int qmp_usbc_parse_dt(struct qmp_usbc *qmp) "failed to get pipe clock\n"); } =20 - ret =3D qmp_usbc_reset_init(qmp, usb3phy_reset_l, - ARRAY_SIZE(usb3phy_reset_l)); + ret =3D qmp_usbc_reset_init(qmp, cfg->reset_list, cfg->num_resets); if (ret) return ret; =20 --=20 2.34.1