Re: [PATCH 1/2] dt-bindings: media: qcom,glymur-camss: Use CSIPHY indices for ports

From: Vladimir Zapolskiy

Date: Thu Nov 05 2026 - 10:52:05 EST


On 11/5/26 16:01, Loic Poulain wrote:
On Thu, Nov 5, 2026 at 2:21 PM Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:

On 05/11/2026 13:04, Loic Poulain wrote:
On Thu, Nov 5, 2026 at 11:45 AM Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:

On 05/11/2026 10:53, Loic Poulain wrote:
So some chipsets share the same IP blocks, with some block/phy
instances disabled. As a result, we need to decide whether we're
numbering based on active instances or on the actual hardware instance
index/offset. If we use active-instance numbering, then yes, it should
be @2 (CSIPHY4 being the third active instance). Alternatively, if the
port numbering is intended to reflect the hardware instance offset,
matching the register prop, then @4 would be more appropriate. It also
has the advantage of directly identifying the underlying hardware
instance, without requiring any additional driver-side mapping. In any
case, @3 is incorrect.

That said, since the bindings have already been merged in its current
form, we'll need to preserve backward compatibility when addressing
this.

This is the input port to camss, so how is it called in camss, not the
csi phy?

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 }. As long as we establish and document the
convention, either approach should work fine.

Today, the Glymur bindings define DT ports { 0, 1, 3 } to map to PHY
indices { 0, 1, 4 }. One could argue that this is already an
established convention, as it is documented in the bindings. However,
it is somewhat confusing.


I believe it should be fine to have incontiguous port indices, because
there is no need to link unused phys to CAMSS on any particular board,
therefore there will be unavoidable "holes", and this can be set right
in the documentation of CSIPHY to CAMSS connection.

--
Best wishes,
Vladimir