Skip to content

Cphy rb3g2 rb4 rb8#693

Open
aarunnan wants to merge 14 commits into
qualcomm-linux:qcom-6.18.yfrom
aarunnan:cphy_rb3g2_rb4_rb8
Open

Cphy rb3g2 rb4 rb8#693
aarunnan wants to merge 14 commits into
qualcomm-linux:qcom-6.18.yfrom
aarunnan:cphy_rb3g2_rb4_rb8

Conversation

@aarunnan

Copy link
Copy Markdown

Added CPHY support of RB3G2, RB4 and RB8

okias and others added 13 commits June 10, 2026 12:55
…ation

Read PHY configuration from the device-tree bus-type and save it into
the csiphy structure for later use.

For C-PHY, skip clock line configuration, as there is none.

Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
…onfiguring C-PHY lanes

So far, only D-PHY mode was supported, which uses even bits when enabling
or masking lanes. For C-PHY configuration, the hardware instead requires
using the odd bits.

Since there can be unrecognized configuration allow returning failure.

Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
Inherit C-PHY information from CSIPHY, so we can configure CSID
properly.

CSI2_RX_CFG0_PHY_TYPE_SEL must be set to 1, when C-PHY mode is used.

Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
…nfiguration is available

The lanes must not be initialized before the driver has access to
the lane configuration, as it depends on whether D-PHY or C-PHY mode
is in use. Move the lane initialization to a later stage where the
configuration structures are available.

Signed-off-by: Petr Hodina <phodina@protonmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
… CSI-2 CPHY init

Add a PHY configuration sequence for the sdm845 which uses a Qualcomm
Gen 2 version 1.1 CSI-2 PHY.

The PHY can be configured as two phase or three phase in C-PHY or D-PHY
mode. This configuration supports three-phase C-PHY mode.

Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Co-developed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
…IPI CSI-2 CPHY init

These values should improve C-PHY behaviour. Should match most recent
Qualcomm code.

Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
…PI CSI-2 C-PHY init

Add a PHY configuration sequence for the sm8250 which uses a Qualcomm
Gen 2 version 1.2.1 CSI-2 PHY.

The PHY can be configured as two phase or three phase in C-PHY or D-PHY
mode. This configuration supports three-phase C-PHY mode.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
…ne configuration

Catch when C-PHY configuration gets used on SoC with CAMSS missing C-PHY
configuration lane registers.

Hopefully this check will disappear as these lane regs gets populated.

--
@BoD
Proliferating special cases in switch statements on a per-SoC basis is
verboten.

Please find another way to do this, you already have a bool to indicate
cphy in struct csid_phy_config {} so at some level CAMSS already has a
bool to indicate what to do.

Please make that logic accessible to logical consumers throughout,
in this case the CPHY code.
--

Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
…ting link frequency

Ensure that the link frequency divider correctly accounts for C-PHY
operation. The divider differs between D-PHY and C-PHY, as described
in the MIPI CSI-2 specification.

For more details, see:
https://docs.kernel.org/driver-api/media/tx-rx.html#pixel-rate

Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Jigarkumar Zala <jzala@qti.qualcomm.com>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
Use these switch cases to add the sa8775p (CAMSS_8775P) 3-phase 1.5 Gsps
settings, programming the appropriate common-control register 5/6/7
and reset-release values for C-PHY and D-PHY.

Signed-off-by: Jigarkumar Zala <jzala@qti.qualcomm.com>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
Add the CSI2 RX PHY type select bitfield and program it from
the configured PHY type so that the CSID RX path is told whether the incoming
data is C-PHY or D-PHY.

Signed-off-by: Jigarkumar Zala <jzala@qti.qualcomm.com>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
Add the lane_regs_sa8775p_3ph[] register table for the
sa8775p Gen3 CSIPHY at 1.5 Gsps, and select it in csiphy_lanes_enable() for
CAMSS_8775P when the endpoint is configured for C-PHY, falling back to the
existing sa8775p D-PHY table otherwise.

Signed-off-by: Jigarkumar Zala <jzala@qti.qualcomm.com>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
Share the C-PHY/D-PHY lane_regs selection for CAMSS_8300 so
the sa8300 platform uses the same 3ph handling as CAMSS_8775P. Also drop
CAMSS_8300 from the missing-C-PHY-table guard now that a C-PHY table is
provided.

Signed-off-by: Jigarkumar Zala <jzala@qti.qualcomm.com>
Signed-off-by: Anusha Arun Nandi <aarunnan@qti.qualcomm.com>
Signed-off-by: aarunnan <aarunnan@quicinc.com>
@qlijarvis

Copy link
Copy Markdown

PR #693 — validate-patch

PR: #693

Verdict Issues Detailed Report
⚠️ 8 Full report

Final Summary

  1. Lore link present: No — This is a WIP v4 series not yet posted to lore.kernel.org for upstream review

  2. Lore link matches PR commits: N/A — No lore link to compare against; this appears to be internal development work

  3. Upstream patch status: Not upstream — Marked as "WIP v4", indicating work-in-progress status. The series adds C-PHY support to Qualcomm CAMSS driver but is not yet ready for upstream submission

  4. PR present in qcom-next: Not checked — This is a feature addition PR for internal integration; upstream submission would follow after internal validation

Recommendation: Clean up commit messages (especially patch 08/13), remove WIP tags from subjects, address Bryan O'Donoghue's review feedback, and ensure all patches follow kernel commit message standards before merging or submitting upstream.

Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #693 - media: qcom: camss: Add C-PHY support for Qualcomm CAMSS driver
Upstream commit: N/A (WIP v4 series, not yet submitted upstream)
Verdict: ⚠️ PARTIAL

Commit Message

Check Status Note
Subject matches upstream N/A WIP series, not yet upstream
Body preserves rationale ⚠️ Patch 08/13 contains review comments in commit message
Fixes tag present/correct N/A No Fixes tags needed for new feature
Authorship preserved Multiple authors properly credited
Backport note (if applicable) N/A Not a backport

Diff

File Status Notes
camss-csiphy.h Clean addition of phy_cfg field
camss.c Proper endpoint parsing for C-PHY/D-PHY
camss-csiphy-3ph-1-0.c ⚠️ Contains large register tables, proper for hardware init
camss-csid-gen2.c Clean PHY type configuration
camss-csid.c Proper C-PHY detection and configuration
camss-csiphy-2ph-1-0.c Return type change for error handling
camss-csid-gen3.c PHY type select bit added
camss.c (link freq) Correct C-PHY/D-PHY divider calculation

Issues

Critical:

  • Patch 08/13: Commit message contains unresolved review feedback from @BoD (Bryan O'Donoghue). The commit message includes:
    --
    @bod
    Proliferating special cases in switch statements on a per-SoC basis is
    verboten.
    
    Please find another way to do this, you already have a bool to indicate
    cphy in struct csid_phy_config {} so at some level CAMSS already has a
    bool to indicate what to do.
    
    Please make that logic accessible to logical consumers throughout,
    in this case the CPHY code.
    --
    
    This review comment should NOT be in the final commit message. It indicates the patch may need rework.

Minor:

  • All patches have double subject prefixes: [PATCH 01/13] [PATCH WIP v4 1/9] - the inner WIP tag should be removed before merging
  • Patch 08/13 subject is incomplete: "C-PHY needs own lane configuration" - missing proper capitalization and clarity
  • Multiple sign-off chains suggest this is a collaborative work-in-progress that may need consolidation

Authorship:

  • ✅ Multiple authors properly credited (David Heidelberg, Casey Connolly, Petr Hodina, Luca Weiss, Jigarkumar Zala, Anusha Arun Nandi)
  • ✅ Co-developed-by tags used correctly in patch 05/13
  • ✅ Reviewed-by tags preserved from upstream reviews
  • ✅ Suggested-by tag properly credits Sakari Ailus in patch 09/13

Verdict

Do not merge as-is. Patch 08/13 contains unresolved review feedback in the commit message that must be removed. The series appears to be a work-in-progress (WIP v4) that requires cleanup before final submission. The technical changes look reasonable, but the commit message hygiene needs attention.

Final Summary

  1. Lore link present: No — This is a WIP v4 series not yet posted to lore.kernel.org for upstream review

  2. Lore link matches PR commits: N/A — No lore link to compare against; this appears to be internal development work

  3. Upstream patch status: Not upstream — Marked as "WIP v4", indicating work-in-progress status. The series adds C-PHY support to Qualcomm CAMSS driver but is not yet ready for upstream submission

  4. PR present in qcom-next: Not checked — This is a feature addition PR for internal integration; upstream submission would follow after internal validation

Recommendation: Clean up commit messages (especially patch 08/13), remove WIP tags from subjects, address Bryan O'Donoghue's review feedback, and ensure all patches follow kernel commit message standards before merging or submitting upstream.

@qlijarvis

Copy link
Copy Markdown

PR #693 — checker-log-analyzer

PR: #693
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/27304123988

Checker Result Summary
Checker Result Summary
checkpatch ⚠️ 1 warning: commit description line exceeds 75 chars
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed (pre-existing warnings in nouveau driver only)
check-uapi-headers No UAPI header changes
check-patch-compliance All 13 commits missing required prefix
tag-check N/A Not applicable for this branch
qcom-next-check N/A Not applicable for this branch

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #693 - media: qcom: camss: C-PHY support (13 commits)
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/27304123988

Checker Result Summary
checkpatch ⚠️ 1 warning: commit description line exceeds 75 chars
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed (pre-existing warnings in nouveau driver only)
check-uapi-headers No UAPI header changes
check-patch-compliance All 13 commits missing required prefix
tag-check N/A Not applicable for this branch
qcom-next-check N/A Not applicable for this branch

❌ check-patch-compliance

Root cause: All 13 commits in this PR lack the required subject prefix (UPSTREAM:, FROMLIST:, BACKPORT:, or FROMGIT:).

Failure details:

Checking commit: [PATCH WIP v4 1/9] media: qcom: camss: csiphy: Introduce PHY configuration
Commit summary does not start with a required prefix

Checking commit: [PATCH WIP v4 2/9] media: qcom: camss: csiphy-3ph: Use odd bits for configuring C-PHY lanes
Commit summary does not start with a required prefix

... (repeated for all 13 commits)

Checking commit: media: qcom: camss: Add CAMSS_8300 C-PHY support
Commit summary does not start with a required prefix

The checker expects commit subjects to begin with one of:

  • UPSTREAM: - for patches already merged in mainline
  • FROMLIST: - for patches posted to upstream mailing lists
  • BACKPORT: - for backported patches
  • FROMGIT: - for patches from another git tree

Fix:

  1. If these patches are posted upstream (WIP v4 suggests they are), prefix all commit subjects with FROMLIST::

    git rebase -i HEAD~13
    # Mark all commits for 'reword'
    # For each commit, change:
    #   FROM: media: qcom: camss: csiphy: Introduce PHY configuration
    #   TO:   FROMLIST: media: qcom: camss: csiphy: Introduce PHY configuration
  2. If these are internal-only patches, prefix with CHROMIUM: or the appropriate internal prefix per your project policy.

  3. Remove the [PATCH WIP v4 X/9] prefix from the first 9 commits - this is mailing list metadata that should not appear in git commit subjects.

Reproduce locally:

cd /path/to/kernel
git clone https://github.com/qualcomm-linux/kernel-checkers.git
bash kernel-checkers/check-patch-compliance.sh \
  --kernel-src . \
  --base d58ad5c480fa \
  --head a41cccdbdf25

⚠️ checkpatch

Root cause: Commit 862a3fb6dafd ("media: qcom: camss: Prepare CSID for C-PHY support in gen3") has a commit description line exceeding 75 characters.

Failure details:

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#7: 
the configured PHY type so that the CSID RX path is told whether the incoming

862a3fb6dafdc21518952b13f142ed338b982436 total: 0 errors, 1 warnings, 0 checks, 14 lines checked

Fix: Reword the commit message for 862a3fb6dafd to wrap lines at 75 characters or less. This is a style preference, not a hard blocker.

Reproduce locally:

cd /path/to/kernel
scripts/checkpatch.pl -g 862a3fb6dafd

Verdict

1 blocker to fix before merge:

The check-patch-compliance failure is a hard blocker. All 13 commits must be prefixed with FROMLIST: (or the appropriate prefix). The checkpatch warning is minor and can be addressed optionally.

Action required: Rebase the PR to add the required prefix to all commit subjects and remove the [PATCH WIP v4 X/9] metadata from commits 1-9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants