Devicetree
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>,
	Krzysztof Kozlowski <krzk@kernel.org>
Cc: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>,
	Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Suresh Vankadara <svankada@qti.qualcomm.com>,
	Vikram Sharma <vikram.sharma@oss.qualcomm.com>
Subject: Re: [PATCH 1/2] dt-bindings: media: qcom,glymur-camss: Use CSIPHY indices for ports
Date: Thu, 5 Nov 2026 15:46:12 +0000	[thread overview]
Message-ID: <3df59469-e665-4901-b4b4-512604194ddd@kernel.org> (raw)
In-Reply-To: <CAFEp6-2_opRq3pj6S=2nDFxXBv0waeyGBKSxp3t8OOe6vvKcoQ@mail.gmail.com>

On 05/11/2026 14:01, Loic Poulain wrote:
>>> The CSIPHYs are connected to the CAMSS input ports, which can then be
>>> multiplexed and routed to different CSIDs. The mux identifies its PHY
>>> inputs using the hardware PHY IDs, so the CSIPHY4 is identified as the
>>> CAMSS PHY4 input. In this configuration, PHY2 and PHY3 inputs are not
>>> connected.
>> I could not find that information in Glymur HPG, but maybe I looked
>> wrong. CSID Wrapper lists CSID 0-2, not 0, 1 and 4, but again maybe I am
>> looking at wrong device description/interface...
> Yes, there are three CSIDs (CSID0-2) and two CSID_LITEs
> (CSID_LITE0-1). These blocks select the PHY source to be routed by
> programming their PHY ID (PHY ID = PHY index + 1), as defined by the
> PHY_NUM_SEL field in CSI2_RX_CFG0.
> 
> If the CAMSS port ID matches the PHY index, the port ID can be used
> directly as a routing reference, which keeps the implementation
> straightforward.
> 
> Alternatively, exposing logical port IDs such as { 0, 1, 2 } also
> makes sense. In that case, the driver would simply maintain an
> internal mapping table, for example mapping DT/logical ports { 0, 1, 2
> } to PHY indices { 0, 1, 4 }.

The media-graph informs which PHY connects to which CSID. The 
port-number in the DT really only identifies the fact a PHY input exists 
- it should be considered a mux in front of the set of CSIDs with the 
media-graph being the route.

Since the route is runtime selectable, the media-graph is the boss, not DT.

You can try this on any CAMSS device right now, PHYs connect 
independently to CSI decoders.

PHY_NUM_SEL is derived in the driver, not taken directly from the port 
number: the port indexes csiphy_res[] and csiphy_res[port].csiphy.id is 
the hardware PHY index, e.g. port@3 on x1e is CSIPHY4.

More work should be done to represent the fact-of-life - the mux. This 
was discussed extensively in the standalone PHY series.

The ports being numbered with the PHYs was a consequence of the PHYs 
living inside the CAMSS node - which we have the opportunity now to 
break with and should.

Port number in DT should just be a linear 0-X for the number of PHY 
inputs. Which CSI decoder that port routes to is still a runtime selection.

Honestly I don’t see much value in continuing to treat port numbers as 
hardware mappings in DT now that standalone PHYs have landed.

---
bod

  parent reply	other threads:[~2026-11-05 15:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02  8:50 [PATCH 0/2] media: qcom: camss: Use Glymur graph ports as CSIPHY IDs Nihal Kumar Gupta
2026-11-02  8:50 ` [PATCH 1/2] dt-bindings: media: qcom,glymur-camss: Use CSIPHY indices for ports Nihal Kumar Gupta
2026-11-04 13:52   ` Krzysztof Kozlowski
2026-11-04 16:00     ` Nihal Kumar Gupta
2026-11-04 16:12       ` Krzysztof Kozlowski
2026-11-05  5:32         ` Nihal Kumar Gupta
2026-11-05  7:33           ` Krzysztof Kozlowski
2026-11-05  9:18             ` Nihal Kumar Gupta
2026-11-05  9:23               ` Krzysztof Kozlowski
2026-11-05  9:53                 ` Loic Poulain
2026-11-05 10:15                   ` Bryan O'Donoghue
2026-11-05 10:45                   ` Krzysztof Kozlowski
2026-11-05 11:03                     ` Bryan O'Donoghue
2026-11-05 12:04                     ` Loic Poulain
2026-11-05 13:21                       ` Krzysztof Kozlowski
2026-11-05 14:01                         ` Loic Poulain
2026-11-05 15:39                           ` Vladimir Zapolskiy
2026-11-05 15:54                             ` Bryan O'Donoghue
2026-11-05 15:46                           ` Bryan O'Donoghue [this message]
2026-11-05 16:18                             ` Loic Poulain
2026-11-02  8:50 ` [PATCH 2/2] media: qcom: camss: Add Glymur specific resources Nihal Kumar Gupta
2026-11-02  8:58   ` sashiko-bot
2026-11-04 13:32     ` Nihal Kumar Gupta
2026-11-04 13:54   ` Krzysztof Kozlowski
2026-11-04 16:01     ` Nihal Kumar Gupta

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=3df59469-e665-4901-b4b4-512604194ddd@kernel.org \
    --to=bod@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=mchehab@kernel.org \
    --cc=nihal.gupta@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=svankada@qti.qualcomm.com \
    --cc=vikram.sharma@oss.qualcomm.com \
    --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