From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796158933; b=YurgolhhRPUtRfb+0FZWBY18IonBQ7T4kehXbeQI1EjvGRf2zA3k8hICptPHnOi/M3+a xPSluaBII9biHBmlXRTxP3xY29TMqkOld4KaW4/xGjoH2iab+nOzXoRPjvLh57+LQW7PC IfiZbGuwuehXI9fDqiStO5t3HA9sU32p/G2emfe8SKlxdPbYTC1F+zxstNZBN1+PWMIeP hP1Q58xt+MCgyDp7A3hJPq9/HuCYpdNIU0ErlgKdAo2ztFxr1vCL33Cm85sdgHO4fr7S8 jgGicoYzqvffmiTUAk4o1u3VaHiZLmZfJFMnvtkdiOl4w5z0qF42o4YaGGwUVxUyK/A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796158933; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:To:Cc: Subject:Date:Message-Id:X-Mailer:MIME-Version: Content-Transfer-Encoding:X-Proofpoint-Spam-Info: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Spam-Details-Enc:X-Authority-Analysis: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=Gq+LmpbEkXd7EjB7JO6lReFqHZyN/gZitEV4Zm//CY0=; b=KbrsmqU/FVfWAAX/glDCfH24Mhzal/dnvrJz9MSQRgZ74Us9ph5c3ykwHHwwRyjQtMlo TKlWoDSAovU6YN4MjRs/kTZsvt+XcxzIgI4R5Y3lWS4T92PjUu/9RvRJlUuGJw92rckTI AwAvUzYdhLSGBtsZfodET1lLVGy8sHLiD79GWF8OwA+iTegEYrS2qqzTGDZHB0BxcUTz8 KQaD65M+JTTBLIhq9jigklK9getNG+mLH2x/GaR7Uc1/EoOC2vbwgB1SrBkVcmved16Ln hIyor8zWisIDNcsCItl5TLhurnxUrJFV2o5VoaFHMk9AVHQQ8Mqm/GJmsYkmdg1ZWdg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=GqGF9E3y; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=aFYznTEG; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB300606A325 for ; Tue, 1 Dec 2026 21:02:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BB300606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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.a=rsa-sha256 header.s=qcppdkim1 header.b=GqGF9E3y; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=aFYznTEG 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 6B1Jc3Ha3373241 for ; Tue, 1 Dec 2026 21:02:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=Gq+LmpbEkXd7EjB7JO6lReFqHZyN/gZitEV 4Zm//CY0=; b=GqGF9E3y4YR4q1IlxpjRlfdk+VRZFUnIC9kZMjQ7fWF7r28HELS V4zVoeJGPdUAFqiGEXF/vf/ee98gMGFCLg1Y0VhU2fuNJz0eNo8MOO2/ny0MJXK8 vqfbqDsygR3FNmvS1qIOGO97dN40VgspngIM1nXt2i9aO6pPIa4Dz6sis06S6J79 QC0pszXkQevhRMsbHtRF4QYNkc3vCb0BjYTCMl2uztUZMd1MSjXH/uKzCRVNTF6A MpK6qsDupBCoPhiCNPotFAZBKkAZeSFFMp9EfCrqcQlm3dGruC97g2Cy/rYsipAZ 21q92KRtXZL5ntBGmEGfRUGuiU08NSeN7PA== Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ja4jm08p3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 01 Dec 2026 21:02:11 +0000 (GMT) Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-341eff9e381so17866685eec.1 for ; Tue, 01 Dec 2026 13:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796158930; x=1796763730; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Gq+LmpbEkXd7EjB7JO6lReFqHZyN/gZitEV4Zm//CY0=; b=aFYznTEGQG3F8bku+Z113qkR5fxdOgbwegLpekuaXiwwt7bVu0TzAmWlrIH57jrAeW mG9NbPgjg1mmpavX7iluE5ScQLQ5EcVPZxJ02I6iJnIlqweFNugsU2z7EfMd56Y4UaF+ ZwAm1amk+Fih+CM6ikji1vzolwdbVHu0farzNHfBVCiyQabR4k5ywtIAsezzlnCo8fSM /dfQYPU8mhiFBXFBrIqdwCVQ/7Yc/5/ZU4rlHa0DgN6fowdiYZi4wTb35cCKV6Thc0QW ItUKNIjq6ATIornoJ+SZcOGYeszn4vs2UBfVXhPkApl+MYFY1lHuqsBIkJaDemM4E6LT VVGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796158930; x=1796763730; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Gq+LmpbEkXd7EjB7JO6lReFqHZyN/gZitEV4Zm//CY0=; b=QVmyU0KlMZShesuD5TAqMhTEHNRaUDmKmbiunplfBl00ppSvTKvvZWjrCSTZd+dbx+ na1qi0/rJ25zH9GYNSSNRX/Z9dyrWy+57c0QyGEWyGrU0UiJol3z+bpIjtnjhTRXqHqj qxaO5vt3KNzWtdRYE0gpVhV24GjKV+wc4FR6YzqH8giqvB74y6JEsi2oG3+5a4V88+Q8 RoGKTm3Y8Yc6PAWXiB3S8PhYw4JdJBL1Oao6cK6S1sBNBpjFZey+Y7zb6JcxUJy6uidq uZJdlAMsPALFo011FPndkgBXnb1h0SkVBYgWx+BvAXM9ix67+bMNGKA3WbUpPzSuZelW ssyA== X-Forwarded-Encrypted: i=1; AL+hErEoP6FD0UCmYkSHJnCRxBMJwfd0CmkDsLkbWB2+Vjq7mG9oJNYY8ytczSMMiCnV2PNHZjRmXkAVMrsY+Pw=@vger.kernel.org X-Gm-Message-State: APuU4Z/cKyy/ghest0lTh0KhOgW5BqfWc9wNpm6erIGY79BaMfCWufva 7xaplnKFG3Ij+/k906inZi2IX+aYJVG1fP3NEv0SbBDELHZISzgTVXz1HyoB4ZLp2uR1rWGKzZo O2hXEvoniGB2lWTWIQmA8kVbhj5IR5kXrUUpWdFOkQmGpNG4rUXDDENbKKJJPDOYxJCE= X-Gm-Gg: AZFdTZc13leASY7gy5YtSpmAay45dB9hTnJGvJtLYLP+YFHp8vSbb+/ecwkq/5lusvf Sb+bPqc+ifYcoresfaj7WUhHQqsv/m0yB0OF1VZ1Bjv8/nbYU6HDQAGBowCsdS4HY+vG/3PZzWb qrsGkJIUj7Qex7sBw7gIZDC94IT2Z3JWcXmaCFFlo4XSMNrd+ALuFhLWAIj+qBzUoO4S9PX0EzI kmmDu8siaBx4KftIh5qQ9JIDdIoCW+9ebhcu7sc1rijKNJ+sfztFVThL07BLM/gy6bpjnPIJFO5 WyhAdwnGEYJClupC9dGX4Mh6PTHxSwRMsP2Ycx7OTQzo33PjVXT5murZ5bzuIuMEYVuhgiM13Jd K1HuntcuX+hHAfGGpC0A+MFhTE/Y6weVZivJJwCaZ7E+5UgNj3OjnnrJJLn8grT0PEYxa1AW66g phT3eLsho8Dn+2g3UtHJDnZvh56rzC X-Received: by 2002:a05:7301:2419:b0:367:185e:867a with SMTP id 5a478bee46e88-38571027a5dmr40752910eec.38.1796158930143; Tue, 01 Dec 2026 13:02:10 -0800 (PST) X-Received: by 2002:a05:7301:2419:b0:367:185e:867a with SMTP id 5a478bee46e88-38571027a5dmr40752872eec.38.1796158929252; Tue, 01 Dec 2026 13:02:09 -0800 (PST) Received: from hu-aarunnan-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38566cd46c5sm140911461eec.11.2026.12.01.13.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 13:02:08 -0800 (PST) From: Anusha Arun Nandi To: Bryan O'Donoghue Cc: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , gjorgji.rosikopulos@oss.qualcomm.com, hariram.purushothaman@oss.qualcomm.com, akapatra@quicinc.com, jigarkumar.zala@oss.qualcomm.com, linux-phy@lists.infradead.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v4 0/5] phy: qcom-mipi-csi2: Add D-PHY support for sa8775p, qcs8300 and sc7280 Date: Tue, 1 Dec 2026 13:02:02 -0800 Message-Id: <20261201210207.1049452-1-anusha.nandi@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAxMDA4MyBTYWx0ZWRfX8B3LYKIXfum0 3NBvdJWolO+0aImUC8SXpo8FJbZHxZScQbKuS63jsGYBJ3M3wyI1vYs1Qecj6X7cWUAdmlir73X mJhMQLx5oNqjehl4PCNpLtQX+Xi2gE8= X-Proofpoint-ORIG-GUID: EbwwFruEA3KUAgzzLjHBIehNYfJlFk30 X-Proofpoint-GUID: EbwwFruEA3KUAgzzLjHBIehNYfJlFk30 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAxMDA4MyBTYWx0ZWRfX1VisV/c9J12t 8Kii9DMaOv09L86HWvs1UftIKayppvd/8iICACCcLsDVFTGYa3B6y3gRJcDCD8Z3hcIpffa+x/y RMK6oJdZy9hySV0fhZIA+o8SZ4d5AIzieOBe9gooGpexExsxMZn0IL633MSPWR7TeqgHpmm9oN2 iO1z9MzYKYrtedRTHjgc69kH36TvEGLHBpYt1ATo824uUsoAegkhlQleKx0+9IcJ6/w8C/q5SYj BeJMJrxlkBZzHFpxsLoNZlWoxFm5rH8GTSkDQgux3Jx6/BcxFtcnBGKKFoke4RhsJMTtuicRSHH INYYwjTgh5ZKaaRZGhPExKO/k3Hxkj/hW7qJpnKCPGapI0CTlSOH2SOaPonoeffIyCTDiHx7P6S rIDd1BglBzppuwd8v5iZJq6CioFYapIPhUobryQtVQJAZd1MW8Neb44wkDOSPDCs/7qPPUEOrEN K5++4lQpfQ6BPczrnAg== X-Authority-Analysis: v=2.4 cv=KYBHIgYD c=1 sm=1 tr=0 ts=6b0f35d3 cx=c_pps a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=1CCf0RsV3WIdBB_ArQoA:9 a=6Ab_bkdmUrQuMsNx7PHu:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-01_04,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 clxscore=1015 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612010083 This series extends the generic Qualcomm MIPI CSI2 PHY driver (drivers/phy/qualcomm/phy-qcom-mipi-csi2-*) with three additional CSIPHY variants: SA8775P, QCS8300 and SC7280. The driver currently only supports x1e80100; these SoCs let CAMSS consume the CSIPHY through the common PHY framework instead of the CSIPHY logic embedded in the legacy in-tree CAMSS driver. QCS8300 shares the same CSIPHY D-PHY hardware as SA8775P, so it does not need its own of_device_id entry: the qcom,csi2-phy.yaml binding declares "qcom,sa8775p-csi2-phy" as QCS8300's fallback compatible, and QCS8300 CSIPHY nodes bind through patch 4's existing "qcom,sa8775p-csi2-phy" match entry. Patch 3 restructures phy-qcom-mipi-csi2-3ph-dphy.c before sa8775p and sc7280 land in patches 4-5. Up to now that one file held both the only D-PHY register-programming code the driver has, and every SoC's register data (x1e80100's lane_regs[]/soc_cfg so far), fine for a single SoC, but adding two more would mean two more multi-hundred-line register tables piling into the same file as the programming logic, with no line between "code a reviewer needs to read" and "data a reviewer just needs to skim for correct addresses/values". Patch 3 splits that: the programming functions move into phy-qcom-mipi-csi2-core.c, next to the rest of the PHY-framework glue, so there's a single file for all D-PHY logic, the register tables move into a new, pure-data phy-qcom-mipi-csi2-dphy-regs.h, #included at the top of core.c. Patches 4 and 5 then add sa8775p's and sc7280's tables straight into that data header instead of the old mixed file. No functional change in patch 3 itself, register addresses, values, and param_type tags are unchanged, only relocated. The restructured files looks something like this - camss.c | v phy-core.c | v phy-qcom-mipi-csi2-core.c ^ | (#include) +--------------+--------------+ | | | D-PHY.h C-PHY.h Future Modes | | | +--------------+--------------+ Mode-specific register headers phy-qcom-mipi-csi2-dphy-regs.h phy-qcom-mipi-csi2-cphy-regs.h Tested on sa8775p, qcs8300 and sc7280. Changes in v4: - Added patch 3, "restructure D-PHY into core.c and dphy-regs.h" (see above for why). - Dropped the "Reviewed-by: Jigarkumar Zala" tags from patches 1 and 5: that review happened internally, not on this list, and Krzysztof pointed out in v3 that a Reviewed-by with no public lore link isn't verifiable. - Patch 2 are otherwise unchanged from v3. - Patches 4 and 5 are now in the header file. Link to v3: https://lore.kernel.org/all/20261105235137.2635442-1-anusha.nandi@oss.qualcomm.com/ Depends-on: https://lore.kernel.org/all/20261102213936.1251316-1-anusha.nandi@oss.qualcomm.com/ Anusha Arun Nandi (5): dt-bindings: phy: qcom: Add common qcom,csi2-phy phy: qcom-mipi-csi2: Make OPP table optional phy: qcom-mipi-csi2: restructure D-PHY into core.c and dphy-regs.h phy: qcom-mipi-csi2: Add sa8775p D-PHY support phy: qcom-mipi-csi2: Add sc7280 D-PHY provider Jigarkumar Zala (5): dt-bindings: phy: qcom: Add common qcom,csi2-phy phy: qcom-mipi-csi2: Make OPP table optional phy: qcom-mipi-csi2: restructure D-PHY into core.c and dphy-regs.h phy: qcom-mipi-csi2: Add sa8775p D-PHY support phy: qcom-mipi-csi2: Add sc7280 D-PHY provider .../bindings/phy/qcom,csi2-phy.yaml | 201 +++++++++ drivers/phy/qualcomm/Makefile | 3 +- .../qualcomm/phy-qcom-mipi-csi2-3ph-dphy.c | 385 ----------------- .../phy/qualcomm/phy-qcom-mipi-csi2-core.c | 306 ++++++++++++-- .../qualcomm/phy-qcom-mipi-csi2-dphy-regs.h | 388 ++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-mipi-csi2.h | 24 +- 6 files changed, 875 insertions(+), 432 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/qcom,csi2-phy.yaml delete mode 100644 drivers/phy/qualcomm/phy-qcom-mipi-csi2-3ph-dphy.c create mode 100644 drivers/phy/qualcomm/phy-qcom-mipi-csi2-dphy-regs.h Best regards, -- Anusha Arun Nandi -- 2.34.1