From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Bryan O'Donoghue <bod@kernel.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Subject: [PATCH 0/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver
Date: Thu, 10 Jul 2025 17:16:46 +0100 [thread overview]
Message-ID: <20250710-x1e-csi2-phy-v1-0-74acbb5b162b@linaro.org> (raw)
This short series adds a CSI2 MIPI PHY driver, initially supporting D-PHY
mode. The core logic and init sequences come directly from CAMSS and are
working on at least five separate x1e devices.
The rationale to instantiate CSI2 PHYs as standalone devices instead of as
sub-nodes of CAMSS is as follows.
1. Precedence
CAMSS has a dedicated I2C bus called CCI Camera Control Interface.
We model this controller as its own separate device in devicetree.
This makes sense and CCI/I2C is a well defined bus type already modelled
in Linux.
MIPI CSI2 PHY devices similarly fit into a well defined separate
bus/device structure.
Contrast to another CAMSS component such as VFE, CSID or TPG these
components only interact with other CAMSS inputs/outputs unlike CSIPHY
which interacts with non-SoC components.
2. Hardware pinouts and rails
The CSI2 PHY has its own data/clock lanes out from the SoC and indeed
has its own incoming power-rails.
3. Other devicetree schemas
There are several examples throughout the kernel of CSI PHYs modeled as
standalone devices which one assumes follows the same reasoning as given
above.
I've been working on this on-and-off since the end of April:
Link: https://lore.kernel.org/linux-media/c5cf0155-f839-4db9-b865-d39b56bb1e0a@linaro.org
There is another proposal to have the PHYs be subdevices of CAMSS but, I
believe we should go with a "full fat" PHY to match best practices in
drivers/phy/qualcomm/*.
Using the standard PHY API and the parameter passing that goes with it
allows us to move away from custom interfaces in CAMSS and to conform more
clearly to established PHY paradigms such as the QMP combo PHY.
Looking at existing compat strings I settled on
"qcom,x1e80100-mipi-csi2-combo-phy" deliberately omitting reference to the
fact the PHY is built on a four nano-meter process node, which seems to
match recent submissions to QMP PHY.
My first pass at this driver included support for the old two phase
devices:
Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/commit/a504c28d109296c93470340cfe7281231f573bcb#b6e59ed7db94c9da22e492bb03fcda6a4300983c
I realised that the device tree schema changes required to support a
comprehensive conversion of all CAMSS to this driver would be an
almost certainly be unacceptable ABI break or at the very least an enormous
amount of work and verification so I instead aimed to support just one new
SoC in the submission.
I've retained the callback indirections give us scope to add in another type of
future PHY including potentially adding in the 2PH later on.
This driver is tested and working on x1e/Hamoa and has been tested as not
breaking sc8280xp/Makena and sm8250/Kona.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
Bryan O'Donoghue (2):
dt-bindings: phy: qcom: Add MIPI CSI2 C-PHY/DPHY Combo schema
phy: qcom-mipi-csi2: Add a CSI2 MIPI D-PHY driver
.../phy/qcom,x1e80100-mipi-csi2-combo-phy.yaml | 95 ++++
MAINTAINERS | 11 +
drivers/phy/qualcomm/Kconfig | 11 +
drivers/phy/qualcomm/Makefile | 6 +
drivers/phy/qualcomm/phy-qcom-mipi-csi2-3ph-dphy.c | 491 +++++++++++++++++++++
drivers/phy/qualcomm/phy-qcom-mipi-csi2-core.c | 281 ++++++++++++
drivers/phy/qualcomm/phy-qcom-mipi-csi2.h | 101 +++++
7 files changed, 996 insertions(+)
---
base-commit: 2b0b621d5db55cf01bb200e6e6976b4ff4810544
change-id: 20250710-x1e-csi2-phy-f6434b651d3a
Best regards,
--
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
next reply other threads:[~2025-07-10 16:16 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 16:16 Bryan O'Donoghue [this message]
2025-07-10 16:16 ` [PATCH 1/2] dt-bindings: phy: qcom: Add MIPI CSI2 C-PHY/DPHY Combo schema Bryan O'Donoghue
2025-07-10 23:08 ` Rob Herring
2025-07-14 14:13 ` Vladimir Zapolskiy
2025-07-14 14:42 ` Bryan O'Donoghue
2025-07-15 6:40 ` Vladimir Zapolskiy
2025-07-15 8:52 ` Bryan O'Donoghue
2025-07-10 16:16 ` [PATCH 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI D-PHY driver Bryan O'Donoghue
2025-07-10 17:08 ` Konrad Dybcio
2025-07-11 9:14 ` Bryan O'Donoghue
2025-07-11 11:29 ` Konrad Dybcio
2025-07-14 14:16 ` Vladimir Zapolskiy
2025-07-14 14:43 ` Bryan O'Donoghue
2025-07-14 14:58 ` Vladimir Zapolskiy
2025-07-14 15:17 ` Bryan O'Donoghue
2025-07-14 15:26 ` Konrad Dybcio
2025-07-14 15:30 ` Vladimir Zapolskiy
2025-07-15 0:13 ` Bryan O'Donoghue
2025-07-15 6:35 ` Vladimir Zapolskiy
2025-07-15 9:01 ` Konrad Dybcio
2025-07-15 9:20 ` Vladimir Zapolskiy
2025-07-15 9:33 ` Konrad Dybcio
2025-07-21 15:46 ` neil.armstrong
2025-07-21 16:16 ` Bryan O'Donoghue
2025-07-21 16:22 ` Bryan O'Donoghue
2025-07-21 16:29 ` Bryan O'Donoghue
2025-07-22 8:32 ` Neil Armstrong
2025-07-22 9:08 ` Bryan O'Donoghue
2025-07-22 9:59 ` Neil Armstrong
2025-07-22 10:37 ` Bryan O'Donoghue
2025-08-12 13:39 ` neil.armstrong
2025-08-12 15:05 ` Bryan O'Donoghue
2025-08-12 16:08 ` Neil Armstrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250710-x1e-csi2-phy-v1-0-74acbb5b162b@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=bod@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=robh@kernel.org \
--cc=vkoul@kernel.org \
--cc=vladimir.zapolskiy@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).