From nobody Thu Oct 2 00:57:52 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 5694A2877D2 for ; Fri, 26 Sep 2025 07:26:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758871611; cv=none; b=G/MQa8Orm2sk33sFCNURsbonmmfonHmklzXbX0v9TZ9rVFnx5EO8fLJUcZc8DUw6Q5fnADu9LjkrVDItdCes5EXDx4HKlzlJbKsCcCM40elnbnOcqzk37b5yXr9WZINwcfzuKcUUgNxIzqlH5bBhjMPvqwJ6CCxpUtX8h2Ma/zg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758871611; c=relaxed/simple; bh=ELWG8LiwmiYEyfPeDUlMXNqM8qMgGsCS4xblAlTbEJQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WRsI0HV/qA1WVu4AOkKSrWFTQuOEvYEiDaytwo2tLsfj5Qf1I3ka/qiJcbQOsDbAfg6TmxsvCGi/5r5qS3BLkf95s3blREXSjVqd9K45r3h88ig2VDUjKWzmR4we9ZVnDZjsbCt+2WBPQZM0/nfkD1svvgHy/FAP7cA6blO4RBU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Am2o/AMX; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="Am2o/AMX" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58Q6t2P0000846 for ; Fri, 26 Sep 2025 07:26:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= psRlzFRQmGXeUGSfcVjnYNDBFIL2wBL8tNvEcKPV1ss=; b=Am2o/AMXBkDOuFFj BN0xG6G7ndAIzTRIHxAE36OEiTYgcM1VU8HPwWUq78Ip1cVhmPlC6GD7FLsngtG5 L/tZDjrIxOIUpVd0LVxZ0w9yLI+SDdsT24k20+VGXTA2TleoODYzrhjm2uINyXFf ZiWzyR4PucPH7V770vC9Sr9LT/Ine0VUnMF5iU2XJGQe404VH3Ghd7g/XZ+dNasA IejgBMNV7XNTSn3TNBlQnsmbTQczcuRvV9DFkfrdD5Cq14vTg3UgmRuyGP5NkDk1 cnjP+YNvxyfByuS91zl9Y65E1QPvjSr/utupNvDqAgKThWBsUq88H3NZ7L6X/kbw GDWs9g== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 49db0tsw2w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 26 Sep 2025 07:26:49 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-b551016556eso429664a12.0 for ; Fri, 26 Sep 2025 00:26:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758871608; x=1759476408; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=psRlzFRQmGXeUGSfcVjnYNDBFIL2wBL8tNvEcKPV1ss=; b=vWg8VCW3g/kcuum1aTnBOZreqqEf+zFDnCuZ1JXKKvW65Etpaz4JOWGJZMnEXFBCFS nN1EsfyphJWnlO/YsFJgb6CHajWavobpBoHR5EXloz/0O7eEpkzRKbgLXJBy+k3QRI0e COQQ5Y6ikh8PYbzj7omJ17qB7PDzykFkTjMJV8gu1ujANp3u/IxYQ1RQAxzSlU/vRZ7U fuT7lJ5yUUn7IByzh6sKpNQQ2/Bd3O3eX5URHVpeOIKvNeKpn7twikbg2xScFt/HtiLv neYshoj1Cu1IQjpa/PtOenWTdy3y0OWvGj/pUFIL6MBpKXZbDo3KLQz2D/hyaWcQz1CX tAQg== X-Forwarded-Encrypted: i=1; AJvYcCW8Cum3IFzMr98TmLkW7HixpnGIepD3FBUZ+MPX4BbKrq67c38HWc8icqjW0JEoxAUetp9A3thWK9rM3VU=@vger.kernel.org X-Gm-Message-State: AOJu0YyN94OODNOZc4MAWru3Ehs1U6PDUmHH19690wPB08btBYrYAHI5 LP5NVELP4iH+z5kKcsyVbNgV6GW+GvG/PtPVXWPlxggg3QchGPJRTQBYUVoSnFPMdgc5vj8P1qI 9x+kMs10KEKBluBKFKy2JhCY+WJkOtE0+zzofk9swBXdzGz3+6rmLAnDiWNqp1eRrFuw= X-Gm-Gg: ASbGncsmrMBCl/ykIcS3qJRdpXUEL+pCseoxF1ARwFnoJlBvWhtw6WZcODa2Ss97afk 0R2J5/3bDSjnPC+WYBX+qFubOWsVgx+pW1L2ikgVLL6zBijY8BFNJhbZmpjyq+hUNcePru22jV2 rY5zHCllPCPcpaDlONL/nyDAQA50qr5JetUEDqqsVaR0pPRmdLHD8BH2muSxSUlyzdTAvl9DtEM 99fUGllZV5vYoLlSdI8BnNh1dexgHH1DKGtsEn2p/79GimQ/Qd5QfawZQ39EuMrTB4XMP6teHcE iegiUOwB2hhwEDiyYYMKsxYTZxPRHCEO8twDkJ17sxRvvad73T/ey3cjdN6IbZ+dZH9IXLv8MYX VL8gNnepYS2HK5U0c0LTnYoVqnio6771k1hJ9sUw5gAtO/qjcKGMCYLFi X-Received: by 2002:a17:902:a507:b0:25a:4437:dbb7 with SMTP id d9443c01a7336-27ed49d5fedmr27989945ad.4.1758871607679; Fri, 26 Sep 2025 00:26:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxSAyhiw2MTcI/NmqZ98HAKqPc0hfqQBjKkbuKjAc9epuCdvKvreEt1D4+pSfhH0QsIo9TKw== X-Received: by 2002:a17:902:a507:b0:25a:4437:dbb7 with SMTP id d9443c01a7336-27ed49d5fedmr27989565ad.4.1758871607181; Fri, 26 Sep 2025 00:26:47 -0700 (PDT) Received: from sziotdisp01-gv.qualcomm.com.ap.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed671d8a2sm45117985ad.55.2025.09.26.00.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Sep 2025 00:26:46 -0700 (PDT) From: Xiangxu Yin Date: Fri, 26 Sep 2025 15:25:41 +0800 Subject: [PATCH v7 05/14] 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: <20250926-add-displayport-support-for-qcs615-platform-v7-5-dc5edaac6c2b@oss.qualcomm.com> References: <20250926-add-displayport-support-for-qcs615-platform-v7-0-dc5edaac6c2b@oss.qualcomm.com> In-Reply-To: <20250926-add-displayport-support-for-qcs615-platform-v7-0-dc5edaac6c2b@oss.qualcomm.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, fange.zhang@oss.qualcomm.com, yongxing.mou@oss.qualcomm.com, li.liu@oss.qualcomm.com, Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Xiangxu Yin X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1758871563; l=3375; i=xiangxu.yin@oss.qualcomm.com; s=20241125; h=from:subject:message-id; bh=ELWG8LiwmiYEyfPeDUlMXNqM8qMgGsCS4xblAlTbEJQ=; b=zmaVB07r32HmpVtcC+B5C54IYIVDvs8vEclG5sjAMe5L1XwWEnY4ERzGLG5jFl4Ib+AzZzwOO Eh2N5d9F6fcDBHXUGGh9YHirwHvVYYYGpwjrhJLv5FPRK30pA0p4H6/ X-Developer-Key: i=xiangxu.yin@oss.qualcomm.com; a=ed25519; pk=F1TwipJzpywfbt3n/RPi4l/A4AVF+QC89XzCHgZYaOc= X-Authority-Analysis: v=2.4 cv=I9Vohdgg c=1 sm=1 tr=0 ts=68d64039 cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=yJojWOMRYYMA:10 a=EUspDBNiAAAA:8 a=zr9GHpnC6WUyfWqp_BsA:9 a=QEXdDO2ut3YA:10 a=bFCP_H2QrGi7Okbo017w:22 X-Proofpoint-GUID: LzL2R_HaPxAxPZkflySA8UycTA34sfG1 X-Proofpoint-ORIG-GUID: LzL2R_HaPxAxPZkflySA8UycTA34sfG1 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTI1MDE3MSBTYWx0ZWRfXxM8jz6k1vsux ly5kjsk4wFs/ai2XMCgrBi1AGAFH0CuBg5RQQbVDwse8O50NQ6jh41/65HJlHsTAHBMz/uj1Md/ TcbRDljZ5DiE694oSvf9Gn6kWeWRFH5FExGgTCBJot+t82O3Ki/BCBlwot87SBaKGYdjnSr8LFk YiodthYISrRrnzmgxJNrl+UIaoJFCfYFRz12QoN0hasFiJwupeUXiIh7vXJMhPpqHOIhMADrD7M 3SEstIuYfSltkORl6mpuq9tpeWiL2Bxa72jlw7ZSbL8+LnX7jXz/7vpqwQYaJsk8tKlD/YMhpi6 CktDcSR5pkRebDHy9L51hIb3P0QhQfSaynt598DS2v7c5l/cQpaT566dX3P81dy6dzv00aX6Fte sGP7mZ0GAyZkHUvELlrJuvrLnSGzGg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-26_02,2025-09-26_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 phishscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2509150000 definitions=main-2509250171 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 3b48c69f9c3cb7daec495ebc281b83fe34e56881..f9e20f43435c050e33e9490343a= 4693a339d692a 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