Devicetree
 help / color / mirror / Atom feed
From: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Vijay Kumar Tumati <vijay.tumati@oss.qualcomm.com>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Bryan O'Donoghue <bod@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver
Date: Fri, 5 Jun 2026 15:01:37 +0530	[thread overview]
Message-ID: <59331aa7-8430-4754-861c-4ba6a4810ccd@oss.qualcomm.com> (raw)
In-Reply-To: <htxqjgwjczsghunsbvo44lwkadzeg2kp6wfcksf3hkmcubvs2d@cw5r67uxskvu>



On 04-06-2026 03:44, Dmitry Baryshkov wrote:
> On Wed, Jun 03, 2026 at 02:37:48PM -0700, Vijay Kumar Tumati wrote:
>>
>>
>> On 6/3/2026 5:57 AM, Bryan O'Donoghue wrote:
>>> On 03/06/2026 13:40, Dmitry Baryshkov wrote:
>>>>> Are you sure about that ?
>>>> Yes.
>>>>
>>>>> ipcat I thought designated lane 7 specifically as clk-lane i.e. named it
>>>>> CLK_LN of some description.
>>>> Split configurations explicitly use other lanes for clocks. E.g. check
>>>> the RB5 Navigation schematics, CAM0B connector.
>>>
>>> Can you please check:
>>>
>>> CSI_3PHASE_COMMON.CSI_COMMON_CTRL5
>>>
>>> 0 LN0_PWRDN_B Lane 0
>>> ...
>>> 7 LNCK_PWRDN_B Clock Lane
>>>
>>> ... just a badly name field
>>>
>>> CSI_2PHASE_CTRL10
>>>
>>> Bit[2] = IS_CLKLANE
>>>
>>> Right so CSI_2PHASE_CTRL10 controls lane mode, indeed. Thanks for checking.
>> I can check this with the HW team. Although the SWI has this knob, there may
>> be some limitations to use any lane as the clk lane. AFAIK, only two
>> specific lanes are clk capable in DPHY mode.>
> 
> 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@linaro.org

Regards,
Nihal

  reply	other threads:[~2026-06-05  9:31 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23  2:48 [PATCH v8 0/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver Bryan O'Donoghue
2026-05-23  2:48 ` [PATCH v8 1/2] dt-bindings: phy: qcom: Add CSI2 C-PHY/DPHY schema Bryan O'Donoghue
2026-05-23  3:04   ` sashiko-bot
2026-05-24 10:59     ` Bryan O'Donoghue
2026-05-24 15:37     ` Bryan O'Donoghue
2026-06-02 20:55   ` Frank Li
2026-06-02 21:00     ` Bryan O'Donoghue
2026-06-02 21:59   ` Vladimir Zapolskiy
2026-06-02 22:51     ` Bryan O'Donoghue
2026-06-03 20:16       ` Vijay Kumar Tumati
2026-06-03 20:24         ` Vijay Kumar Tumati
2026-06-03 20:51           ` Vladimir Zapolskiy
2026-06-03 21:18             ` Bryan O'Donoghue
2026-06-03 21:46               ` Vijay Kumar Tumati
2026-06-05  2:59                 ` Vijay Kumar Tumati
2026-06-04  0:07               ` Vladimir Zapolskiy
2026-06-04  0:30                 ` Bryan O'Donoghue
2026-06-04  8:46                   ` Vladimir Zapolskiy
2026-06-04  9:06                     ` Bryan O'Donoghue
2026-06-04  9:20                       ` Vladimir Zapolskiy
2026-06-04 11:04                         ` Bryan O'Donoghue
2026-06-09 13:56                       ` Konrad Dybcio
2026-06-09 19:20                         ` Vijay Kumar Tumati
2026-06-09 22:30                           ` Dmitry Baryshkov
2026-06-19 12:37                             ` Konrad Dybcio
2026-06-03 20:52           ` Bryan O'Donoghue
2026-06-03 21:35             ` Vijay Kumar Tumati
2026-06-04 10:54       ` Vladimir Zapolskiy
2026-07-01 22:54     ` Bryan O'Donoghue
2026-07-01 23:37       ` Vladimir Zapolskiy
2026-07-02  0:08         ` Bryan O'Donoghue
2026-07-02  0:10           ` Bryan O'Donoghue
2026-07-02  8:31           ` Vladimir Zapolskiy
2026-07-02  8:46             ` Bryan O'Donoghue
2026-07-02  9:28               ` Vladimir Zapolskiy
2026-05-23  2:48 ` [PATCH v8 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver Bryan O'Donoghue
2026-05-23  3:35   ` sashiko-bot
2026-06-02  8:18   ` Loic Poulain
2026-06-02 13:58     ` Bryan O'Donoghue
2026-06-03 10:10       ` Loic Poulain
2026-06-02 22:07   ` Vladimir Zapolskiy
2026-06-02 22:22     ` Bryan O'Donoghue
2026-06-03 12:10       ` Dmitry Baryshkov
2026-06-03 12:22         ` Bryan O'Donoghue
2026-06-03 12:40           ` Dmitry Baryshkov
2026-06-03 12:57             ` Bryan O'Donoghue
2026-06-03 20:42               ` Vladimir Zapolskiy
2026-06-03 21:12                 ` Bryan O'Donoghue
2026-06-03 23:58                   ` Vladimir Zapolskiy
2026-06-03 21:37               ` Vijay Kumar Tumati
2026-06-03 22:14                 ` Dmitry Baryshkov
2026-06-05  9:31                   ` Nihal Kumar Gupta [this message]
2026-06-05 10:30                     ` Bryan O'Donoghue
2026-07-01 15:53                     ` Bryan O'Donoghue
2026-07-01 16:05                     ` Bryan O'Donoghue
2026-06-03 21:11   ` Vijay Kumar Tumati
2026-06-03 22:39   ` Vijay Kumar Tumati

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=59331aa7-8430-4754-861c-4ba6a4810ccd@oss.qualcomm.com \
    --to=nihal.gupta@oss.qualcomm.com \
    --cc=bod@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=kishon@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.org \
    --cc=vijay.tumati@oss.qualcomm.com \
    --cc=vkoul@kernel.org \
    --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