From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 822941E1C11 for ; Thu, 19 Mar 2026 03:48:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773892104; cv=none; b=C6kTaQMcw7L/eVH+TbUJe9sQRG6YD170ZgceXjHSELH11b4MqzJVw0pQYGct9MdcEGDy/jXyBiaj/TMuOmh0yhPAmOtf+8Fu0K4m/wjcwVYAeQBv6M0nNNhyj4MkNPB1T/HWdCEz+DvVgarW8ncAxhNF+QE4Eh/jxOHBhJdEOXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773892104; c=relaxed/simple; bh=GjT8hX4GoLE57pLmBQAVyLUFHndk0TADrBaKx6V+sLU=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=b6PV5xD0UHsfrSsFZACfI1zCDLYvkGyGF67Hfttgw/pmdgUaf9/aJqfELfZr968ruDk6CQuLbiZBZ+InZ09HgH3lniaFuOiTNyndEbY0SP/BfNq3MTY7XDzOQWcZAv5R7gtBxOL4Tr/s9bYzS05G6sIx8SXT1zuVp/mOXtsC9RA= 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=QKdWofyw; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cRZgnt4a; arc=none smtp.client-ip=205.220.168.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="QKdWofyw"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cRZgnt4a" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62J0XnYJ914408 for ; Thu, 19 Mar 2026 03:48:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=JX6V7P6bsRPeotKtiH7RJ9 N7+4pq9ewOSYm/l2L69q8=; b=QKdWofywVfC8mLqUB1djykNVRCqNJ4ytFYOYsG /KtKWI5O+WHdjewmYRcN8l2ftdjgz2OcQgkoZFO4ZV6dzlsTLA6BiQ0+/Ie1ZIyA 1QC3UnyJdguaRDBn42y8Og9AzfxsxIVaE1oNbtydb0XDq7Yjxyi3zCKi3wUWESfg kN9vkZjY2zCNRoFk7F9jLdq+HnNW385cWuZTXaOiGd0JZCWs9Luy3M5ZcYOwMHot 8nD7/BJuwXG3GhO4Ds72zomPIh4nmIyUJzqxlXPSorNSTWPfYLh4Cwo2x1P956Am Rx2pi0zE2MABMqJbgKTRvNOk7r98BNNeWRdU28eVB3rk6Y4w== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cytxytye2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 19 Mar 2026 03:48:22 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-5091782ab06so72449241cf.0 for ; Wed, 18 Mar 2026 20:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773892102; x=1774496902; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=JX6V7P6bsRPeotKtiH7RJ9N7+4pq9ewOSYm/l2L69q8=; b=cRZgnt4a3IYci6L+SLj3rlgfuNX+AkWOLAsOItcMKaX8gkXAJSgT08RMWyxqlvd/xn T1mapdiM81Te5ZZvjLiAB8uK2Y7gtH8ZgUjGS21c++VYaUGYBaOPDj8X7NaAa2gj+RuA Fe6alr8+BkL0tg0UCYBsqLTKt5nY0yjE3Ped0fFhuuiwYkhj6J0Bi4ezNtWKVvLWs8O6 CyGbgmaoqDBBwOvtqLZ545x6j4s+fNiP04ya0fBcg9qQhhvRa9OG9g3+EeD2nMC5HrX2 uNOj0fS7HY/bo1zi6m4qcMFaCYSkGJWroeHLP+FOiFNd/TyDHsv6jTPayBnwS2IwHFs4 ieTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773892102; x=1774496902; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JX6V7P6bsRPeotKtiH7RJ9N7+4pq9ewOSYm/l2L69q8=; b=m5ABiVpQ0RqsaNikJtEcz6vweoVCCcDIB9hsrUpNV8dqMzqA3xhV5qR/gVpNOqpB2z TDx9xajbRwtcKCoL3LjvDeao4x0jFJD1kEa8L8ogWjITDvGcu6O3D2Qevr40neQgXD42 GzWDFsAXCpBkISRlojpR+eC1V5Yiq4rzDY2/D+eE7bL7Xm3Q+xcg4/7S/PQespQq3FYv l7xkNRYVhO0pOu8AYtqBRpOYqrlPxh0IqaqSmByZeSri6agGnWmD3VMaHwpuHBrOPF/S 3EomIQAiL8h3LEvvEEUjsAKjo4s6K/GwD45vTMTzukvzyBKdlLMiQOtqtL6NyCXaRDPq Nt4w== X-Gm-Message-State: AOJu0YzIrWktfNe8ZwLWpIeWiDQ6zBe7kaUwi+eL3+CAck3w2ZmKfyL7 TvuCrAMvSsvpYC60HubV2jqofDKZQ+WllF2qcPwnlh4LuMNsDcPfdYMeSnCqG0PRRA8lKDFVQNW 5UHf5Xp6kYTl/yNFBrB5mRZyCLUBDbH0xdXMhI7YTtcAqNHw6wuBZr8t/yjhNJ1+E/24= X-Gm-Gg: ATEYQzz73xL5pokcwHj6/Q1vykO5ASPyu7TBdCsfFioHYDkFKd5Z8Odfkxb3qqEwi9b 40xIAWjrBrMmw0w2akF275ykQ0y8TjkzXXct/7a2s3rJa8dlCQXd2V4iQnnVLoyCUygWpAqtCBU vnXxYqmXQUCLb71Bfp2ROegIo/rxTpEEOt/EeaGnXJLw2oTUIA2tTN68Hl2b5LrSUzx8qI+SnER EQTk+Uh7g1rJt8VNECy6C+Dm3baoWe2dgpkoPY2olOpG2bD6hIXWqM4xdSYbSM0kgthsSQfi28y 1zSztOpqshsiqoS9v+mqwbgyOkCHj2igarzzhSZi8Yh6uXXkGQ4JRYGS/6k3EuI/PcjbUcuDy4+ sAl4/iaE04dhLFfs3a03mjRradkgofIIbBGo4T28/cu/ywrD1pg7khvPOZiUtL4iTwdajXPgPTP LW2sB1TjMeNczrY+tro5y4VF1Bw6+INXk+X6E= X-Received: by 2002:ac8:7f04:0:b0:50b:2e8c:6ad8 with SMTP id d75a77b69052e-50b2e8c6cadmr226651cf.34.1773892101703; Wed, 18 Mar 2026 20:48:21 -0700 (PDT) X-Received: by 2002:ac8:7f04:0:b0:50b:2e8c:6ad8 with SMTP id d75a77b69052e-50b2e8c6cadmr226291cf.34.1773892101202; Wed, 18 Mar 2026 20:48:21 -0700 (PDT) Received: from umbar.lan (2001-14ba-a073-af00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a073:af00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a279c79442sm907649e87.70.2026.03.18.20.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2026 20:48:20 -0700 (PDT) From: Dmitry Baryshkov Subject: [PATCH v6 0/4] drm/msm/hdmi & phy: use generic PHY framework Date: Thu, 19 Mar 2026 05:48:17 +0200 Message-Id: <20260319-fd-hdmi-phy-v6-0-cefc08a55470@oss.qualcomm.com> 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: 7bit X-B4-Tracking: v=1; b=H4sIAAFyu2kC/23Oy2rDMBAF0F8JWldCo5etrvIfpQu9HInGViq5o ib43ysHsgh0M3AH7uHeUQ0lhYreT3dUQks15aUH9XZCLprlEnDyPSNGmaBANZ48jn5O+BY3LIQ dOejJOjeg3riVMKXfh/bx2fNU8ozXWIJ5GpxqNgKA4pQAg0GAxoC7t5aNWFO2Gr9yO1/TYkomu VwONqa65rI9NjZx4AclqWT0ZU4TuD+cNUZJZvwgz7lW8v1jri7PM+kHHauafBKKchCvhOyEHIE xE7Ty3P5D7Pv+BwRCMEM3AQAA X-Change-ID: 20240109-fd-hdmi-phy-44b8319fbcc7 To: Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Vinod Koul , Neil Armstrong Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-phy@lists.infradead.org, Dmitry Baryshkov , Konrad Dybcio X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=4372; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=GjT8hX4GoLE57pLmBQAVyLUFHndk0TADrBaKx6V+sLU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBpu3ICJCKy3A19oDDChvBzxx7B9r5GPU+ihItK3 ZBilBRuiYmJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCabtyAgAKCRCLPIo+Aiko 1VXFB/9LpajkYmQVIUq/d8ZFH142i2Gr/sXj5aitG99qq0vTEUO1esGql0jcvkWJvnYNPUoK1fk whb1q0odkeY4adRCYRXu6R5R6eXgsdMMeq9BQ1FpOHQhaW/Gn0A/hRNNFLMQGos/WnvTKXa1CDu 72ISmg/zqatGwp/xsPYZ9HCCnk3BpPhTCC8itvG23j+XTc8UZkPWtPkCakjzmbjLaFRoG4RUCpR SXt4EgExHOw5PA/pTk+j4COVYr91kfPGmewrXnb7aVpK98cyzB9JpwewaIYu3NjRHo+NY8U32Su gw8MEdwvEqFIOE0nr3UeWEM9PFs1zGXH8uQOe6j0pX7K3r0N X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-GUID: CnV9Ze-VEe4czfvF9WzJXyNdVbbToriP X-Authority-Analysis: v=2.4 cv=FKAWBuos c=1 sm=1 tr=0 ts=69bb7206 cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=aG6DWvB8Nz23F0sxf60A:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzE5MDAyNiBTYWx0ZWRfX7pwUID6qnK3l vDfV3OeCah+SS+nQi7GVjlHYY5Tj93IRsXROwkPpmtH1guCJs7Kh1iFIiPGhTVp2N0E2eKPfRTy LwwcHr/Ti2jyFYBkRs0BNXv3mwxQttsy0hLuXOPUAvq3ws7y5FM0VhQNDFyPGBvaoBuv/vE2qv/ iFgVqKDHP6IHTGlBjh3CVJdH0/Az0NYf7E6f76CHZMmQfq42mNyZKgPlfzKwaGtN+JEm2G2AfiX flyJrbRnd2OaBzUCTIkKmIhrJEEHPW3II9dmnPLsunBrBkEQBq4wc3BKXiTFNEhlv0QHa8NiQyE 1x8kPJsr1+A6rFR6cO36QGZpU7vl0q2I5cxpvB+w8QngyZuk7uAU0fU+arG8Z3FP8lH40OwpW07 U8aZ+5W1Swt1A9VcZU818nbKLAEm6l5qXJ9/F/MNSXkmR1/pxDwXQhzWyQMjl71KXrwzxSrkhph wh+l3cpDfpKOhGQuW/Q== X-Proofpoint-ORIG-GUID: CnV9Ze-VEe4czfvF9WzJXyNdVbbToriP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-18_02,2026-03-17_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603190026 The MSM HDMI PHYs have been using the ad-hoc approach / API instead of using the generic API framework. Move MSM HDMI PHY drivers to drivers/phy/qualcomm and rework them to use generic PHY framework. This way all the QMP-related code is kept at the same place. Also MSM8974 HDMI PHY, 28nm DSI PHY and apq8964 SATA PHY now can use common helpers for the UNI PLL. This also causes some design changes. Currently on MSM8996 the HDMI PLL implements clock's set_rate(), while other HDMI PHY drivers used the ad-hoc PHY API for setting the PLL rate (this includes in-tree MSM8960 driver and posted, but not merged, MSM8974 driver). This might result in the PLL being set to one rate, while the rest of the PHY being tuned to work at another rate. Adopt the latter idea and always use phy_configure() to tune the PHY and set the PLL rate. Merge strategy: cross-tree merge via the immutable tag. Signed-off-by: Dmitry Baryshkov --- Changes in v6: - Changed MSM8974 HDMI PHY driver to use FIELD_PREP / FIELD_GET (Konrad) - Fixed rate recalculation for MSM8974 HDMI PHY (Konrad) - Dropped register read/write wrappers - Link to v5: https://lore.kernel.org/r/20260314-fd-hdmi-phy-v5-0-58122ae96d3b@oss.qualcomm.com Changes in v5: - Kept only a single place which handles extp clk (after PHY power on, before PHY power off) (Neil) - Inlined pm_runtime calls in the HDMI TX driver, replaced pm_runtime_resume_and_get() with pm_runtime_get_sync(), since atomic_pre_enable() can not fail. - Renamed registers defines to drop the REG_ prefix. - Link to v4: https://lore.kernel.org/r/20250520-fd-hdmi-phy-v4-0-fcbaa652ad75@oss.qualcomm.com Changes in v3-v4: - Rebased on top of linux-next, solving conflicts - Squashed add-and-remove patches into a single git mv patch - Dropped HDMI PHY header patch (merged upstream) Changes in v2: - Changed msm8960 / apq8064 to calculate register data instead of using fixed tables. This extends the list of supported modes. (Implementation is based on mdss-hdmi-pll-28lpm.c from msm-4.14). - Fixed the reprogramming of PLL rate on apq8064. - Merged all non-QMP HDMI PHY drivers into a common PHY_QCOM_HDMI driver (suggested by Rob Clark) --- Dmitry Baryshkov (4): drm/msm/hdmi: switch to generic PHY subsystem phy: qcom: apq8064-sata: extract UNI PLL register defines phy: qcom-uniphy: add more registers from display PHYs phy: qualcomm: add MSM8974 HDMI PHY support drivers/gpu/drm/msm/Makefile | 7 - drivers/gpu/drm/msm/hdmi/hdmi.c | 58 +- drivers/gpu/drm/msm/hdmi/hdmi.h | 80 +-- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 80 ++- drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 225 ------- drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c | 51 -- drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 761 ---------------------- drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 765 ----------------------- drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c | 141 ----- drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c | 44 -- drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 460 -------------- drivers/gpu/drm/msm/registers/display/hdmi.xml | 537 ---------------- drivers/phy/qualcomm/Kconfig | 24 + drivers/phy/qualcomm/Makefile | 14 + drivers/phy/qualcomm/phy-qcom-apq8064-sata.c | 23 +- drivers/phy/qualcomm/phy-qcom-hdmi-28hpm.c | 352 +++++++++++ drivers/phy/qualcomm/phy-qcom-hdmi-28lpm.c | 462 ++++++++++++++ drivers/phy/qualcomm/phy-qcom-hdmi-45nm.c | 186 ++++++ drivers/phy/qualcomm/phy-qcom-hdmi-preqmp.c | 212 +++++++ drivers/phy/qualcomm/phy-qcom-hdmi-preqmp.h | 59 ++ drivers/phy/qualcomm/phy-qcom-qmp-hdmi-base.c | 185 ++++++ drivers/phy/qualcomm/phy-qcom-qmp-hdmi-msm8996.c | 443 +++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-hdmi-msm8998.c | 496 +++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-hdmi.h | 77 +++ drivers/phy/qualcomm/phy-qcom-uniphy.h | 74 +++ 25 files changed, 2628 insertions(+), 3188 deletions(-) --- base-commit: 95bcfacccdad8a76e02a8eaa92baaf09c879877e change-id: 20240109-fd-hdmi-phy-44b8319fbcc7 Best regards, -- With best wishes Dmitry