From mboxrd@z Thu Jan 1 00:00:00 1970 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 2C28C322C78 for ; Sat, 14 Mar 2026 05:06:35 +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=1773464797; cv=none; b=f8eLm+43pu3jjYJDqVm1vwYPQ/3ERUq0DSHoxc3uNuRjmN9J490KywgNjKGahzsCY4UJmeraTXXhEWgojw7IB2rIykjKK22qD0RQ6JQl8EpYBp71Bg38liQl+iuat8r9k/A6kpYe9wa1hJ29mvSzJtFJdX3+EDESy00dNhwWqw8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773464797; c=relaxed/simple; bh=dpVL6xHiAyTcRZvdVTUxyACDfNacks8+MDrD7qZtgII=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=q+9r4h6nzUq6wdZT5oCj6Mpm16WMuk4MxcyRkQjxayUrW9ZcEzw/0ZgMRysqcR+56beBfOb9IIKr9+3x1ns/Yk+BG2I3eWIn3pO1/3gh7MmEBGRrMiS1bNCXVzAJj6bkrSlL8AvrITpBNJxck8VHa1Aki3SFS6sUWI3VEBJ7dbQ= 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=mtx/wY2Y; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=AIpwHi47; 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="mtx/wY2Y"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="AIpwHi47" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62E3nMNn677236 for ; Sat, 14 Mar 2026 05:06:35 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=uRmdk1ifzAXT+4aK/1/vkT qfkWelFGrIyVShhIr/5Zk=; b=mtx/wY2YYEb+n1VBg+RmNyAfervdRuoBNqnAnD 48+EdTZZYYFC9t5NP44WzumeAjiK5jqA22GNInBE0v/vKKeBRRT463mQ27de38eX Iai8WXBlcUu6rfyykzfj809lhR4KgkU2rpniNAYKBvGp4rlPrEiBbB3zVTGPKGty yZ6sYUVhKEA+VsnbeurFLCu2/a6cv4ukksYDPS1TaCjHq1rA1U35mjrhx2/tx5NL jlCqs42BPUFhpvl6fCd7L8DaxKazmrdLw9I4CVMOqQiKfhPIk9xqBnogeLIpeuY/ Z4/QKfXWYyTVzzVedZfNVxYUKhtcWRtYSzf+2jEZ2vUph2wA== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cw03xg3r4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 14 Mar 2026 05:06:34 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-509159f57e0so219348731cf.3 for ; Fri, 13 Mar 2026 22:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773464794; x=1774069594; 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=uRmdk1ifzAXT+4aK/1/vkTqfkWelFGrIyVShhIr/5Zk=; b=AIpwHi47/Wk0lBakfsKXY4nYDZdDOvYEUZsFP19oECc80dTgR4yoXPKTDVAAc0PguA 9DBrIDnJgyRa9uadthr6Udp33FngXRiEodfPlXILoKQ73ogU6x8ZhhVGx4CMlGwYXccD IV/ksi0CkQKWmhrKlGYrU7kgrL5BtdbH7iLZcIRWyOuoA3t+vp8sane/6S6xIGIBCMFr IvqQMEZqNhacdBarwiiko0IbBgYIt1Tsg+FOFGP0YudII/ZtM0BJdFR96cadNmrRqoX3 M7QQGOrTVvRZW7vfkx6iw7NwKNfMn4JUns39P6iqPNtciUx7sPoLRiVtOACML7JlKnMT A1Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773464794; x=1774069594; 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=uRmdk1ifzAXT+4aK/1/vkTqfkWelFGrIyVShhIr/5Zk=; b=EXhEJ1InJ0d45JYGn5OP22NFfHAfZ1Hc+gYjRag2kzm8odeyCt39JtxDDhT7m61lZp 3owwwp7QzJzZpzR/mU0fXo6XTuLoIlymaW9J02+yH184pURkWRZCRV0Z7fjjtekRm7AU XO/9oTyio51ZvT0amiqGrrCygd75KhLt3xYBTzY/jk8MVhIH+Y+8ZnrELERSmR7qXHwC dxQ2hE5cVFCAwBTZtmyVGWAII3Zozdw5/wUcX0olSPRToNZSziMkuX6EOLXWpMkekUX+ D+8z2rZB1bJlgJpnk35qy+s7MJt29yXMprlp26mOvUMf5U7rxY6xbYfhpvs+1DJcrzZA ysLg== X-Gm-Message-State: AOJu0YyoDc0k5IENwfAYdl9kgt+aJKuLGmyF5bqHtfoAlHcg0vYBlzzn MlGtjfPRd7ghq58ck38w4/rmEk/Nrc1g7qVm3MKVTuO1H1tc/ElXESPuRgI9VZLiEzvYcrMIJJ6 vt8d5tutkth+mMULhNsTz/YdReeXD/j7J/ikxAIVfbrygQ1RmYLsyn3SLXCiT1g4QLTY= X-Gm-Gg: ATEYQzz7DWZzKU4kFouyrvpAxQkA3erI5P5LulZN1h6MIW0jTyWKrpECD6xGAg2wgh6 uAcMZ6q4X5qrL7Ek7No0NvKQOoTQJLwKKiDnXFBOHypHHd2mUz0b5nfyt6FTMfA7Jrv4z+TP+XR EjLOHvTWTG8Fz39VnZNwIBaO59xFZxxwwkbkG9EeQOrTJpbYCN7bLlXydCzGTUF5O1m+ewvichR c/VGOHW69J2o+gp0f7w9wQ6EcI1EyxB0SuMrBU1qnkoXZx4GCudJrSlaHYnUZU3n7HMX7VDzhLE JT+v9w7PjxVigACyW+4tpJKy9Ics5bPE1OEA2oDn+Ia0DEtWh8ljBnMsdjEYxR5302wf+BKHVp/ nI8CzAHH7piZpwiSeqfOcGc1IxeByegOk8VvIWPHUczIOSV/PQv61XopMi0ETwF7RcpfHo0Lt9u DSVrejjez3EpIL+dHiNawC52pvkTZZ0iFKp6Y= X-Received: by 2002:ac8:5a87:0:b0:509:1b01:8929 with SMTP id d75a77b69052e-50957cf5250mr79097491cf.3.1773464794309; Fri, 13 Mar 2026 22:06:34 -0700 (PDT) X-Received: by 2002:ac8:5a87:0:b0:509:1b01:8929 with SMTP id d75a77b69052e-50957cf5250mr79097241cf.3.1773464793816; Fri, 13 Mar 2026 22:06:33 -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-5a15636206bsm1982771e87.67.2026.03.13.22.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 22:06:31 -0700 (PDT) From: Dmitry Baryshkov Subject: [PATCH v5 0/4] drm/msm/hdmi & phy: use generic PHY framework Date: Sat, 14 Mar 2026 07:06:18 +0200 Message-Id: <20260314-fd-hdmi-phy-v5-0-58122ae96d3b@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=H4sIAMrstGkC/1XOQQ6CMBAF0KuYrp2mU1oQV97DuCil2EahOkUiM dzdQuLCzSR/kv/yPyw5Ci6x4+7DyE0hhTjkoPc7Zr0Zrg5CmzOTQiqBooauBd/2AR5+BqWaQ4F 111hbsdx4kOvCe9POl5w7ij2Mnpz5GYWo5QERy0JwlFgprAEheyPNvDE0J3+L0+keBkORR7qur A9pjDRvGye14iulhZbib86kID9sY0yppWkrfYop8efL3G3se54PuyzL8gU6+GMi9AAAAA== 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=4083; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=dpVL6xHiAyTcRZvdVTUxyACDfNacks8+MDrD7qZtgII=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBptOzVFzbufK/Pv/ssbcuMRW6VJ3TLt05H6aH7U W/uoIwvBW6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCabTs1QAKCRCLPIo+Aiko 1Zd0B/0WSzvf4ZiWaezOqFchqErUFw8lThh2cUGjBEL1kB7F1c1TwENIyYeltHt9bglOH5j+Zos kpr6aLYMOpgP0eYEmhl8WAriX+woGYntlzeVYxmD66mlIvnCMqdmRMaCftjg5KH/KdzPJXUDRsx cyy7ixuVv20jpLMabU4iprDhO80cZKMC9Le8U3lbGLtrzjl6xU0tClreKVuzgaukADmvkw4VRyI 7sX5IKeRs3vxtfgTeefva/zDDsFPBtwYj5q9Y+LWHXybWjvpU+GQNafnJhPWdCoKlsfrDmSes7n T6aNwNuhSwhIvzh6XqV3IxsJiAvzVXKSajYmUCheiXRrWF0y X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzE0MDAzNyBTYWx0ZWRfX7jpHDtXPidnO xFwQ+tbXhAXihlLANgIsE7VcXqgRfLB66qvvbBoYtn9OIXzJGr7oYAGftRdrpOpQCyuczn1iwph NUXhVX0ne+6CDKhPJHkDF7wgheXYlcOm3rEFxoCGhwB4jc8lt+xddbivb08sa2uPvnQ9w7oo/xd QVJHsGkuxQ8wmqJ6kElr7PJ04OXZ0dRqH2SWowOdzfIvOruZ1vWRc2qB0G/VVsNeodCRdguZgbe 4FOcIWBvfeqAXU1Kzqqc9WGiAg/jtWsd7DOqeJHxPTHAjOr6TOCHMT9X9j7Z2UHkrZCaYJe2sP3 /aIfBiHCyZ/RyyVrz5+yUlwK4yasDFYbGVN5TwnuwzzoT7X8930JDFt6KU06huXJ5bi6ja/I9lK mzVyfKRvg4uovFR5gempzW8zsFE1OXTc0EAqIgLw5508ShoXillw5LkZGqt+NzyDc6XAqigHJEb 3NubZdyULpAbxaOyyeQ== X-Authority-Analysis: v=2.4 cv=YLOSCBGx c=1 sm=1 tr=0 ts=69b4ecda cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=sCsn4_Ng67BVsxP_3UQA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-ORIG-GUID: EfjIs7jLqzwNUWSc5-KyUAYRcuwITKk4 X-Proofpoint-GUID: EfjIs7jLqzwNUWSc5-KyUAYRcuwITKk4 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-14_01,2026-03-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 spamscore=0 malwarescore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603140037 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 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 | 332 ++++++++++ drivers/phy/qualcomm/phy-qcom-hdmi-28lpm.c | 444 +++++++++++++ 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 | 81 +++ 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 | 65 ++ 25 files changed, 2603 insertions(+), 3188 deletions(-) --- base-commit: 6d67f372c3bb68e62b609d0929808c9567df7209 change-id: 20240109-fd-hdmi-phy-44b8319fbcc7 Best regards, -- With best wishes Dmitry