Skip to content

Shikra charger det 618y - #1590

Open
Kriskura176767 wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
Kriskura176767:shikra-charger-det-618y
Open

Kriskura176767 wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
Kriskura176767:shikra-charger-det-618y

Conversation

@Kriskura176767

Copy link
Copy Markdown
Contributor

QUSB2 Phy HW is capable of doing BC.1.2 charger detection. On most of the
platforms, the charger detection is done by PMIC. But on Shikra CQM/CQS
platforms, the PM4125 doesn't have ability to do charger detection and
that responsibility is delegated to QUSB2 Phy which acts on the DP/DM
lines in its control to get the job done.

During process of charger detection, if the controller is supposed to
enter device mode, the charger is detected as SDP/CDP/DCP. The controller
must enter device mode only if the detected charger is SDP/CDP. In case of
DCP, the phy can be turned off after detection. If the controller must
enter host mode, charger detection can be skipped and hence the phy must
know the role before the controller so that appropriate decision can be
taken whether the controller must enter device/host mode or not.

Intention of adding remote endpoints and usb-role-switch property binding
support is as follows:

a) The DP/DM lines do go through the phy to the controller i.e., the phy
exists between connector and controller. Hence adding remote endpoints
depicting the same.

b) Although the usb2 phy is not the entity doing role switching, it still
does need to decide which mode the controller must move into and hence
adding usb-role-switch property to allow role notifications from charger
to go to controller via phy.

Also the driver changes do the following:

a) Refactor phy enable/disable calls to control regulators and clocks.

b) Let the usb-role information coming from PM4125 to pass through the phy
so that when a vbus active signal is detected, the phy can check if its
SDP/CDP/DCP and pass on the role to controller only when the charger is
SDP/CDP. In case of host mode, the role is forwarded without any charger
detection.

c) Since the controller probe relies on phy probe to be completed first,
during phy probe, it won't be possible to get role-switch handle of the
controller. Hence check for controller role switch whenever a role info
is obtained from the connector node.

Link: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-0-5a9d919c66b5@oss.qualcomm.com/

CRs-Fixed: 4759581

QUSB2 Phy HW is capable of doing BC.1.2 charger detection. On most of the
platforms, the charger detection is done by PMIC. But on Shikra CQM/CQS
platforms, the PM4125 doesn't have ability to do charger detection and
that responsibility is delegated to QUSB2 Phy which acts on the DP/DM
lines in its control to get the job done.

During process of charger detection, if the controller is supposed to
enter device mode, the charger is detected as SDP/CDP/DCP. The controller
must enter device mode only if the detected charger is SDP/CDP. In case of
DCP, the phy can be turned off after detection. If the controller must
enter host mode, charger detection can be skipped and hence the phy must
know the role before the controller so that appropriate decision can be
taken whether the controller must enter device/host mode or not.

Intention of adding remote endpoints and usb-role-switch property binding
support is as follows:

a) The DP/DM lines do go through the phy to the controller i.e., the phy
exists between connector and controller. Hence adding remote endpoints
depicting the same.

b) Although the usb2 phy is not the entity doing role switching, it still
does need to decide which mode the controller must move into and hence
adding usb-role-switch property to allow role notifications from charger
to go to controller via phy.

Link: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com/
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
QUSB2 Phy is capable of performing BC.1.2 Charger detection by controlling
the dp/dm lines. On platforms where the PMIC isn't capable of performing
charger detection, the responsibility is delegated to the phy.

On Shikra CQM/CQS platforms, the PM4125 relies on QUSB2 Phy to perform
charger detection. As part of this, the following changes are being done:

a) Refactor phy enable/disable calls to control regulators and clocks.

b) Let the usb-role information coming from PM4125 to pass through the phy
so that when a vbus active signal is detected, the phy can check if its
SDP/CDP/DCP and pass on the role to controller only when the charger is
SDP/CDP. In case of host mode, the role is forwarded without any charger
detection.

c) Since the controller probe relies on phy probe to be completed first,
during phy probe, it won't be possible to get role-switch handle of the
controller. Hence check for controller role switch whenever a role info
is obtained from the connector node.

Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4759581 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4759581

Please ensure the CR has a change task associated with at least one of the entities for this branch.

@qlijarvis

Copy link
Copy Markdown

PR #1590 — validate-patch

PR: #1590

Verdict Issues Detailed Report
✅ 0 Full report

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com/ (present in patch 1/2 commit message)

  2. Lore link matches PR commits: Yes — diff content is identical to lore patches; only index lines differ due to different base commits (expected and acceptable)

  3. Upstream patch status: ⏳ In review — posted to lore.kernel.org on 2026-11-11; only automated sashiko-bot review comments present (2 potential issues flagged: Medium - usb-role-switch overloaded for BC1.2 detection, Low - incomplete usb-role-switch and ports schema); no maintainer acceptance/rejection signals yet; no Reviewed-by:/Acked-by: tags; patch is under community review

  4. PR present in qcom-next/topics: Yes - all 2 commit(s) are present in qcom-next or topics

Verdict: ✅ — click to expand

🔍 Patch Validation

PR: #1590 - Add charger detection support for Shikra
Upstream commit: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com/
Verdict: ✅ PASS

Commit Message

Check Status Note
Subject matches upstream ✅ Patch 1: FROMLIST: prefix added correctly; Patch 2: subject identical
Body preserves rationale ✅ Both patches preserve complete commit message body from lore
Fixes tag present/correct N/A No Fixes tag in upstream patches
Authorship preserved ✅ From: matches lore author Krishna Kurapati for both patches; FROMLIST: prefix allows submitter to differ from author, original author's Signed-off-by: is present
Backport note (if applicable) N/A FROMLIST: patches do not require backport notes

Diff

File Status Notes
Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml ✅ Diff content identical to lore patch; only index lines differ due to different base commits
drivers/phy/qualcomm/phy-qcom-qusb2.c ✅ Diff content identical to lore patch; only index lines differ due to different base commits

Issues

None found. The PR patches faithfully represent the upstream lore patches.

Verdict

Merge as-is. Both commits correctly use the FROMLIST: prefix, preserve the original author's identity and commit message, include the proper lore link, and contain diffs that are identical to the upstream posting.

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com/ (present in patch 1/2 commit message)

  2. Lore link matches PR commits: Yes — diff content is identical to lore patches; only index lines differ due to different base commits (expected and acceptable)

  3. Upstream patch status: ⏳ In review — posted to lore.kernel.org on 2026-11-11; only automated sashiko-bot review comments present (2 potential issues flagged: Medium - usb-role-switch overloaded for BC1.2 detection, Low - incomplete usb-role-switch and ports schema); no maintainer acceptance/rejection signals yet; no Reviewed-by:/Acked-by: tags; patch is under community review

  4. PR present in qcom-next/topics: Yes — both commits present in topics branch (commit 1/2: 9b8dad5cea961fd3f2e171ff867dee5a6ce35b38, commit 2/2: 50118ece31e7b81fe96ff8703e3d8c550dd8aa0d)

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: 8fffe4778122b8d4fac6dd8396a2de99e05be00f
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/2 [PATCH 1/2] FROMLIST: dt-bindings: phy: qcom,qusb2: Add support for partial - subject or partial tree evidence found, but full change was not verified present - exact patch-id match at 9b8dad5cea961fd3f2e171ff867dee5a6ce35b38 present
2/2 [PATCH 2/2] phy: qcom: qusb2: Add charger detection support partial - subject or partial tree evidence found, but full change was not verified present - exact patch-id match at 50118ece31e7b81fe96ff8703e3d8c550dd8aa0d present

Final Status

overall_status: PASS
present_commits: 2/2
partial_commits: 0/2
missing_commits: 0/2
topics_checked_for_commits: 2/2
final_summary: PR present in qcom-next/topics: Yes - all 2 commit(s) are present in qcom-next or topics

@qlijarvis

Copy link
Copy Markdown

PR #1590 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ⚠️ 14 style checks (alignment, mutex comment)
dt-binding-check ✅ Passed
dtb-check ⏭️ Skipped - no DTS changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ❌ Missing prefix on commit 2/2
tag-check N/A Skipped - qcom-next branch
qcom-next-check ✅ Both commits present in topics

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1590 - phy: qcom: qusb2: Add charger detection support
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/46377106447
Target Branch: qcom-next

Checker Result Summary
checkpatch ⚠️ 14 style checks (alignment, mutex comment)
dt-binding-check ✅ Passed
dtb-check ⏭️ Skipped - no DTS changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ❌ Missing prefix on commit 2/2
tag-check N/A Skipped - qcom-next branch
qcom-next-check ✅ Both commits present in topics

❌ check-patch-compliance

Root cause: Commit 2/2 (9660d2842eea) subject line does not start with a required prefix.

Failure details:

Checking commit: phy: qcom: qusb2: Add charger detection support
Commit summary does not start with a required prefix

The second commit in this PR lacks a mandatory subject prefix. The check-patch-compliance checker requires all commits to start with one of: FROMLIST:, FROMGIT:, UPSTREAM:, or BACKPORT:.

Fix:

git rebase -i <base_sha>   # mark commit 9660d2842eea as 'edit'
git commit --amend -m "FROMLIST: phy: qcom: qusb2: Add charger detection support"
git rebase --continue

Choose the appropriate prefix:

  • If this patch is posted to lore.kernel.org → use FROMLIST:
  • If taken from a maintainer tree → use FROMGIT:
  • If merged into mainline → use UPSTREAM:
  • If backported with modifications → use BACKPORT:

Based on the PR context (commit 1/2 uses FROMLIST: and both have lore links), this should be FROMLIST:.

Reproduce locally:

cd kernel
./kernel-checkers/check-patch-compliance.sh <base_sha> <head_sha>

⚠️ checkpatch

Root cause: Commit 2/2 has 14 style CHECK warnings (13 alignment issues, 1 missing mutex comment).

Failure details:

9660d2842eeafb2ab89d181799e812e5b726b3f2 total: 0 errors, 0 warnings, 14 checks, 696 lines checked

CHECK: struct mutex definition without comment
#145: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:554:

CHECK: Alignment should match open parenthesis
#149: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:558:
#165: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:574:
#170: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:579:
#360: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:769:
#364: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:773:
#366: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:775:
#368: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:777:
#370: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:779:
#376: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:785:
#387: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:796:
#389: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:798:
#461: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:870:
#548: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:957:

Analysis:

These are CHECK: level warnings (not ERROR: or WARNING:), which are style suggestions. The kernel coding style prefers:

  1. Mutex comment: Add a comment above the mutex declaration explaining what it protects
  2. Alignment: Multi-line function calls should align continuation lines with the opening parenthesis

Fix:

For the mutex (line 554):

/* Protects charger detection state and role switching */
struct mutex lock;

For alignment issues, adjust indentation so continuation lines align with the opening (:

// Before:
queue_delayed_work(system_freezable_wq,
		&qphy->port_det_w, msecs_to_jiffies(delay));

// After:
queue_delayed_work(system_freezable_wq,
		   &qphy->port_det_w, msecs_to_jiffies(delay));

Note: These are style checks, not blockers. Many maintainers accept patches with CHECK: warnings if the code is otherwise correct. However, fixing them improves code quality and reduces review friction.

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git <base>..<head>

✅ Other Checkers

All other checkers passed:

  • dt-binding-check: ✅ Binding YAML validated successfully
  • dtb-check: ⏭️ Skipped (no DTS file changes)
  • sparse-check: ✅ No sparse warnings in modified code
  • check-uapi-headers: ✅ No UAPI/ABI changes

📋 Additional Context

Integration Status: Both commits are already present in the kernel topics:

  • Commit 1/2: Present at 9b8dad5cea96 in topics
  • Commit 2/2: Present at 50118ece31e7 in topics

This indicates the patches have been integrated into the topic branches, which is expected for qcom-next workflow.


Verdict

1 blocker to fix before merge:

  1. ❌ check-patch-compliance: Add FROMLIST: prefix to commit 2/2 subject line

Optional improvements:

  1. ⚠️ checkpatch: Fix 14 style checks (13 alignment + 1 mutex comment) - recommended but not blocking

The missing prefix is a hard requirement for the check-patch-compliance checker. The checkpatch style issues are optional improvements that would enhance code quality but are not merge blockers.

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.

2 participants