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 - 05:09:55 EST
Hi all,
I am bringing up mainline on a Lenovo Legion Y700 Gen1 (TB-9707F, SM8250).
Its panel is a Novatek NT36523 on a 3-lane C-PHY link, dual DSI, and the
PHY driver is dsi_phy_7nm.c. I would like to ask about the hardcoded
LANE_CFG1 value in dsi_7nm_phy_enable().
What I actually know is one number: on this board, LANE_CFG1 = 0x84 leaves
the panel dark, and 0x04 makes it display. Everything below is context for
that single observation, not an argument for what the value should be.
Method: to read what the bootloader leaves behind I boot with no display
driver loaded (msm never binds) and read the DSI/PHY registers through
/dev/mem, so the kernel has not touched them. Everything else below is a
normal boot with DRM_MSM built in and the panel driver present.
Observations on this board:
1. Bootloader baseline, panel displaying, no Linux display driver:
LANE_CFG1 = 0x04, LANE_ST0 = 0x17, LANE_ST1 = 0x17 (both PHYs).
2. mainline as-is (0x84): LANE_CFG1 = 0x84, LANE_ST0/LANE_ST1 = 0x1f.
The panel does not display.
3. Writing 0x04 instead (selected by phy->cphy_mode, D-PHY left at 0x84)
makes the PHY registers match the bootloader baseline exactly --
0x04 / 0x17 / 0x17 on both PHYs -- and the panel displays correctly
at 1600x2560.
4. Reference point: a Lenovo TB321FU, a different 3-lane C-PHY device,
runs with the stock 0x84 and displays fine. That comes from an
unofficial experimental port (github.com/enij90/armada-tb321fu), which
its author marks as unsupported by the Armada project. I have not been
able to check that device's registers myself, so all I can say is that
the same code path does not break that board.
LANE_CFG1 (0x038) LANE_ST0 (0x148) LANE_ST1 (0x14c)
bootloader 0x04 0x17 0x17
mainline (0x84) 0x84 0x1f 0x1f
mainline (0x04) 0x04 0x17 0x17
TB321FU (port) 0x84 -- --
For context, this board needs a handful of other DSI changes to come up
(command DMA / read-command path, video mode start ordering, the dispcc
MDP clock source, the MDSS reset). Those are constant across the comparison
above: only the LANE_CFG1 writel changes between the two boots that differ.
Questions:
- LANE_CFG1 is written as 0x84 in both dsi_phy_10nm.c and dsi_phy_7nm.c,
with a "TODO: we need to calculate this" comment, and it traces back to
dsi_phy_10nm.c in 2018. Is 0x84 intended as a 4-lane D-PHY default that
also happens to work for C-PHY, or is it expected to be independent of
the lane configuration?
- Would deriving LANE_CFG1 from the per-SoC cfg table, rather than from a
constant in the shared enable function, be a reasonable direction? The
2021 C-PHY series left 0x21/0x84 untouched, and at least one other
3-lane C-PHY device appears fine with 0x84, so on that hardware the
value is either correct or has no effect -- I cannot tell which.
- dsi_phy_hw_v4_0_lane_settings() still carries "TODO: Support all lane
swap configs" and only enables LPRX/CDRX for physical lane 0. I may be
misreading the scope of that TODO, but is LANE_CFG1 part of the same
unfinished work?
- The register database added in 2024 lists reg32 0x00034 as LANE_CFG0 and
0x00038 as LANE_CFG1, but I found no field layout for either. Is there
any public description of the bit fields, or a known reason why the
value is a constant rather than derived from a lane map?
Full register dumps for all four DSI/PHY instances available on request.
Disclosure: I am not a native English speaker; the wording of this message
was improved with the help of an AI assistant. Every register reading, every
build and every test was done by me on hardware I own, and the observations
and conclusions are mine.
Please keep me in Cc -- I am not subscribed to these lists.
Thanks,
Jiekai He