Re: [PATCH v8 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver
From: Bryan O'Donoghue
Date: Fri Jun 05 2026 - 06:39:49 EST
On 05/06/2026 10:31, Nihal Kumar Gupta wrote:
Having clock-names property doesn't mean that all values are valid.CSI_COMMON_CTRL5 is a physical lane power-up bitmap:
- Bits [0,2,4,6] → D-PHY data lanes(LN0, LN2, LN4, LN6)
- Bits [1,3,5] → C-PHY trio lanes(LN1, LN3, LN5)
- Bit [7] → D-PHY clock lane(LNCK) dedicated clock enable
In combo mode, only LN6 can be configurable as a clock lane.
The lane-enable computation in phy_qcom_mipi_csi2_lanes_enable() uses
BIT(data[i].pos) directly, assuming physical bit positions <0 2 4 6>,
but the DT [1] uses conventional indices <0 1 2 3>, producing 0x8F
instead of the correct 0xD5.
This goes unnoticed because the wrong value is immediately overwritten by the
hardcoded 0xD5 in lane_regs_x1e80100, making the dynamic computation effectively dead.
Could you please fix the driver to map logical lane indices, consistent with the gen2 camss convention.
[1]https://lore.kernel.org/all/20260326-x1e-camss-csi2-phy-dtsi- v3-5-1d5a9306116a@xxxxxxxxxx
That's great, thank you for sharing this information, it moves us from "I think" to "the documentation says"
---
bod