Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v4 0/5] phy: qcom-mipi-csi2: Add D-PHY support for sa8775p, qcs8300 and sc7280
@ 2026-12-01 21:02 Anusha Arun Nandi
  2026-12-01 21:02 ` [PATCH v4 1/5] dt-bindings: phy: qcom: Add common qcom,csi2-phy Anusha Arun Nandi
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Anusha Arun Nandi @ 2026-12-01 21:02 UTC (permalink / raw)
  To: Bryan O'Donoghue
  Cc: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam,
	gjorgji.rosikopulos, hariram.purushothaman, akapatra,
	jigarkumar.zala, linux-phy, linux-media, linux-arm-msm,
	linux-kernel, devicetree

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 <anusha.nandi@oss.qualcomm.com>
-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-12-02  8:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 21:02 [PATCH v4 0/5] phy: qcom-mipi-csi2: Add D-PHY support for sa8775p, qcs8300 and sc7280 Anusha Arun Nandi
2026-12-01 21:02 ` [PATCH v4 1/5] dt-bindings: phy: qcom: Add common qcom,csi2-phy Anusha Arun Nandi
2026-12-02  4:49   ` Bryan O'Donoghue
2026-12-02  8:16   ` Nihal Kumar Gupta
2026-12-01 21:02 ` [PATCH v4 2/5] phy: qcom-mipi-csi2: Make OPP table optional Anusha Arun Nandi
2026-12-02  4:55   ` Bryan O'Donoghue
2026-12-02  8:12     ` Nihal Kumar Gupta
2026-12-01 21:02 ` [PATCH v4 3/5] phy: qcom-mipi-csi2: restructure D-PHY into core.c and dphy-regs.h Anusha Arun Nandi
2026-12-02  5:20   ` Bryan O'Donoghue
2026-12-01 21:02 ` [PATCH v4 4/5] phy: qcom-mipi-csi2: Add sa8775p D-PHY support Anusha Arun Nandi
2026-12-01 21:02 ` [PATCH v4 5/5] phy: qcom-mipi-csi2: Add sc7280 D-PHY provider Anusha Arun Nandi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox