From: Bryan O'Donoghue <bod@kernel.org>
To: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Neil Armstrong <neil.armstrong@linaro.org>
Cc: 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>,
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
Subject: Re: [PATCH v4 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver
Date: Fri, 20 Mar 2026 09:56:40 +0000 [thread overview]
Message-ID: <369229e0-06fd-4a22-b6d8-6dfebb5ca3b2@kernel.org> (raw)
In-Reply-To: <5b23408d-c996-4785-8294-233d79168a1b@linaro.org>
On 20/03/2026 00:37, Vladimir Zapolskiy wrote:
> On 3/19/26 17:18, Bryan O'Donoghue wrote:
>> On 19/03/2026 14:56, Vladimir Zapolskiy wrote:
>>>> There's no reason to remove that from CAMSS - it would be an ABI break
>>>> in user-space anyway.
>>> If technically CAMSS CSIPHY could be excluded from the list of CAMSS media
>>> subdevices, then for the sake of simplification it should be done for all
>>> supported platforms in advance, such a change will be independent from this
>>> particular phy series, and vice versa, this CAMSS only driver change will
>>> prepare a ground for media-less CAMSS CSIPHY device drivers, hence it shall
>>> precede this particular CAMSS CSIPHY series.
>>>
>>> For backward compatibility with userspace a noop stub will be good enough,
>>> it's not an issue at all.
>> The standalone PHY driver doesn't require removing the CSIPHY media
>> entity from CAMSS. They serve different purposes and coexist - its
>> important to have a NOP from user-space perspective for legacy and
>> indeed for new implementations.
>>
> There should be no two CAMSS CSIPHY device (or subdevice) drivers, where
> one chop of CAMSS CSIPHY device driver remains to sit under media, and
> another one is under phy subsystem, since it's a further degradation from
> the current already pretty awful state of the CAMSS driver, but at least
> CSIPHY is not scattered over different subsystems today.
>
> It might be fine to move device driver parts related to CAMSS CSIPHY
> driver from media subsystem to phy subsystem, however if only a partial
> transition is planned, and CSIPHY device support is split into two device
> (sub-)drivers, then it merely exposes a quite severe design flaw.
It's not two drivers for the same device. It's two layers:
- The media entity in CAMSS is a pipeline routing abstraction.
It validates formats and connects pads. It does not program
CSIPHY hardware directly.
- The PHY driver programs the hardware — registers, clocks,
regulators, power domains.
This is the same layering as rkisp1 (media pipeline) +
phy-rockchip-inno-csidphy (electrical config). The ISP's media
entities and the standalone PHY coexist in different subsystems
without conflict.
No CSIPHY functionality is duplicated across subsystems. This segmenting
of concepts and functionality isn't even unique. We see this constantly
with USB (where the MAC lives in drivers/usb/ and the electricals in
drivers/phy/) and Display/DSI.
> It looks like it's still undecided, if CAMSS CSIPHY IP is a phy or media
> device, it can not be both at the same time.
We are maintaining the existing user-space setup which presents a
msm_csiphyX v4l2-media device, whilst moving the PHY component out into
drivers/phy where it belongs - completely transparently to user-space.
So we already have a dependency in user-space which needs to be maintained.
The concrete hardware benefits, as I alluded to Neil, are:
- Per-PHY voltage rails
- Per-PHY power domains
- Per-PHY operating points (OPPs)
Those are real-world hardware fixes which "just work" as a result of
dedicated device nodes and a driver specifically written to relieve the
technical debt we've been accruing with the existing model, for years.
Having been educated - brought to the realisation on OPPS, Power-domains
and yes voltage rails it is amazing to me this whole legacy system
hasn't exploded before now but, its certainly way past time to fix it.
We should proceed with moving init sequences, voltages, PDs and OPPs to
drivers/phy.
I'm happy to have a debate about the status of the PHY media device
after, however I have to say I'm skeptical about removing the media
device - something we could do whether the init sequences live in
drivers/media/qcom/camss or in drivers/phy BTW - I'm skeptical about
removing that v4l2 node specifically because we've had it in user-space
for a long time and I do therefore think that constitutes an ABI.
As I've said already though `rm -rf /dev/v4l2-subdev::msm_csiphy*" is
basically an entirely separate debate.
---
bod
next prev parent reply other threads:[~2026-03-20 9:56 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-15 23:52 [PATCH v4 0/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver Bryan O'Donoghue
2026-03-15 23:52 ` [PATCH v4 1/2] dt-bindings: phy: qcom: Add CSI2 C-PHY/DPHY schema Bryan O'Donoghue
2026-03-16 1:58 ` Vladimir Zapolskiy
2026-03-16 2:45 ` Dmitry Baryshkov
2026-03-16 10:49 ` Konrad Dybcio
2026-03-16 12:09 ` Bryan O'Donoghue
2026-03-16 7:42 ` Krzysztof Kozlowski
2026-03-16 21:31 ` Vijay Kumar Tumati
2026-03-17 5:26 ` Bryan O'Donoghue
2026-03-17 20:25 ` Vijay Kumar Tumati
2026-03-23 14:22 ` Konrad Dybcio
2026-03-23 14:29 ` Bryan O'Donoghue
2026-03-15 23:52 ` [PATCH v4 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver Bryan O'Donoghue
2026-03-16 10:12 ` Krzysztof Kozlowski
2026-03-16 12:04 ` Bryan O'Donoghue
2026-03-18 10:15 ` Neil Armstrong
2026-03-18 13:17 ` Bryan O'Donoghue
2026-03-18 15:07 ` Neil Armstrong
2026-03-18 15:27 ` Dmitry Baryshkov
2026-03-19 13:08 ` Vladimir Zapolskiy
2026-03-19 13:17 ` Bryan O'Donoghue
2026-03-19 14:05 ` Neil Armstrong
2026-03-19 15:06 ` Bryan O'Donoghue
2026-03-19 14:56 ` Vladimir Zapolskiy
2026-03-19 15:18 ` Bryan O'Donoghue
2026-03-19 16:08 ` Neil Armstrong
2026-03-19 16:56 ` Bryan O'Donoghue
2026-03-19 17:39 ` Neil Armstrong
2026-03-20 0:37 ` Vladimir Zapolskiy
2026-03-20 9:56 ` Bryan O'Donoghue [this message]
2026-03-18 15:47 ` Bryan O'Donoghue
2026-03-22 16:44 ` kernel test robot
2026-03-22 23:31 ` kernel test robot
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=369229e0-06fd-4a22-b6d8-6dfebb5ca3b2@kernel.org \
--to=bod@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--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=neil.armstrong@linaro.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