Re: drm/msm/dsi: LANE_CFG1 hardcoded to 0x84 on a 3-lane C-PHY panel (7nm PHY, SM8250)

From: Jiekai He

Date: Thu Nov 19 2026 - 07:30:08 EST


Thanks, that clears it up completely. So 0x04 is not a magic value: lane2
keeps the value 4, and lane3 becomes 0 = DSI_PHYSICAL_LANE_INVALID. (We had
guessed that lane3 was being dropped, but without the field layout there was
no way to confirm it.)

That matches the readback exactly:

LANE_CFG1=0x84 LANE_ST0/LANE_ST1 = 0x1f (four lanes ready)
LANE_CFG1=0x04 LANE_ST0/LANE_ST1 = 0x17 (lane3 not ready)

and only the second configuration drives a 3-lane panel.

The DT for this board already says data-lanes = <0 1 2>, on both DSI
instances, and dsi_host.c parses that into num_data_lanes. But dsi_phy_7nm.c
ignores it and writes LANE_CFG1 as the fixed constant 0x84, so a 3-lane
C-PHY
link still gets the four-lane mapping, lane3 included.

Two things I am unsure about:

- whether LANE_CFG1 should follow the number of entries in data-lanes
(which dsi_host already knows as num_data_lanes) rather than cphy_mode
alone, or

- whether you would expect a qcom,lane-map-v2 style binding upstream, with
0 meaning INVALID as it does downstream.

And to check my understanding: on later SoCs, enabling the fourth lane in
C-PHY mode is harmless because the lane simply stays idle, and sm8250 -- or
perhaps only the SM8250-AC (870) variant used here -- is the odd one that
does not tolerate it?

Thanks,
Jiekai He

On 19/11/2026 18:44, Neil Armstrong wrote:
> LANE_CFG0 and LANE_CFG1 are lane mappings. LANE_CFG0 maps lanes 0 & 1,
while
> LANE_CFG1 maps lanes 2 & 3.
>
> 4 first bits is lane0 for CFG2 and lane2 for CFG1,
> 4 following bits is lane1 for CFG2 and lane3 for CFG1.
>
> LANE_CFG0=0x21 selects 1 for lane0, 2 for lane1
> LANE_CFG1=0x84 selects 4 for lane2, 8 for lane3
>
> Your working setup:
> LANE_CFG1=0x04 selects 4 for lane2, 0 for lane3
>
> Looking at downstream, it sets the value from the `qcom,lane-map-v2` DT
> property, and 0 is `DSI_PHYSICAL_LANE_INVALID`, meaning writing 0x04
> disables lane3.
>
> The downstream Linux code always enables the 4 lanes, even in C-PHY mode,
> and doesn't support not enabling a lane.
>
> I guess since C-PHY is 3 lanes, it's expect not to route lane3, it
definitely
> works on later SoCs, but perhaps sm8250 behaves differently ?