Skip to content

Add SMBLite charger support for PM4125 - #1558

Open
raryan-qcom wants to merge 3 commits into
qualcomm-linux:qcom-6.18.yfrom
raryan-qcom:smblite-charger-for-qli
Open

raryan-qcom wants to merge 3 commits into
qualcomm-linux:qcom-6.18.yfrom
raryan-qcom:smblite-charger-for-qli

Conversation

@raryan-qcom

Copy link
Copy Markdown

The PM4125 PMIC, used on the Qualcomm CQ2390 platform (cocos),
integrates the SMBLite switch-mode battery charger IP. The existing
qcom_smbx charger driver only supports the SMB2 charger IP found on
PMI8998 and PM660, so PM4125 currently has no charger support at
all.

SMBLite is a reduced-feature variant of SMB2: it shares the same
SPMI bus and overall driver model, but uses a different register base
layout (five separate SPMI peripheral bases instead of a single base
with fixed offsets), a different battery-overvoltage status
register, SOC-based recharge instead of VBAT-based recharge, and a
different JEITA configuration sequence.

This series extends the existing qcom_smbx driver to support both chip
types side by side, selecting the correct register bases and handling
logic based on chip->type. This keeps a single driver and power-supply
class device covering both SMB2 and SMBLite hardware.

CRs-Fixed: 4759514

Raj Aryan added 3 commits November 26, 2026 17:12
PM4125 integrates the SMBLite switch-mode battery charger IP, which
differs enough from the SMB2 IP already supported on PMI8998/PM660
(separate SPMI peripheral bases per block, a different interrupt
set, raw ADC-based JEITA thresholds) that it has no existing binding
to reuse. Add one to describe it.

Link: https://lore.kernel.org/all/20261126-smblite-charger-for-pm4125-v2-1-20656509518b@oss.qualcomm.com/
Signed-off-by: Raj Aryan <raj.aryan@oss.qualcomm.com>
Signed-off-by: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
PM4125 uses the SMBLite charger IP, a reduced-feature variant of SMB2.
While both use the same SPMI bus and driver model, they differ in register
layout, status reporting, recharge mode and JEITA configuration. Extend
qcom_smbx to handle these differences so PM4125 can use the existing
charger driver. Select register bases and handling based on chip->type,
allowing SMB2 and SMBLite to share one driver and power-supply class
device.

Link: https://lore.kernel.org/all/20261126-smblite-charger-for-pm4125-v2-2-20656509518b@oss.qualcomm.com/
Signed-off-by: Raj Aryan <raj.aryan@oss.qualcomm.com>
Signed-off-by: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
… bridge

PM4125 integrates an SMBLite switch-mode battery charger. Add its
charger node to the PM4125 device tree and enable it on the Shikra
CQM SOM.

Shikra's primary HS phy endpoint was wired directly to the dwc3
controller, leaving no place to switch the USB role at runtime.
Route it through an intermediate connector/controller port pair and
mark the phy usb-role-switch capable, needed by the upcoming QUSB2
charger-detection work.

Link: https://lore.kernel.org/all/20261126-smblite-dt-v1-1-0f4f4401db3b@oss.qualcomm.com/
Signed-off-by: Raj Aryan <raj.aryan@oss.qualcomm.com>
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
Signed-off-by: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4759514 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4759514
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

@qlijarvis

Copy link
Copy Markdown

PR #1558 — validate-patch

PR: #1558

Verdict Issues Detailed Report
✅ 0 Full report

Final Summary

  1. Lore link present: Yes — all three commits have correct Link tags pointing to their respective lore.kernel.org message-IDs

  2. Lore link matches PR commits: Yes — commit messages, authorship, and diff content are faithful to the lore sources; context-only differences in line numbers are expected for FROMLIST patches

  3. Upstream patch status: ⏳ Decision Pending — patches posted Nov 26, 2026; under review on linux-pm@vger.kernel.org, devicetree@vger.kernel.org, and linux-arm-msm@vger.kernel.org; no maintainer decision yet (patches are same-day fresh); automated bot review noted one minor issue on commit 3 (missing usb-role-switch property on shikra-cqs-evk)

  4. PR present in qcom-next/topics: Fail - 1/3 commit(s) are missing from both qcom-next and topics

Verdict: ✅ — click to expand

🔍 Patch Validation

PR: #1558 - Add SMBLite charger support for PM4125
Verdict: ✅ PASS


Commit 1/3: FROMLIST: dt-bindings: power: supply: Add qcom,pm4125-charger

Upstream commit: https://lore.kernel.org/all/20261126-smblite-charger-for-pm4125-v2-1-20656509518b@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream ✅ Subject matches lore patch (FROMLIST prefix added correctly)
Body preserves rationale ✅ Commit body identical to lore patch
Fixes tag present/correct N/A No Fixes tag in upstream or PR (new feature)
Authorship preserved ✅ From: matches lore author (Raj Aryan); both Signed-off-by lines present
Backport note (if applicable) N/A FROMLIST prefix used correctly for pending upstream patch

Diff

File Status Notes
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml ✅ Context differs (line 154 vs 160) due to tree state; hunk content identical
Documentation/devicetree/bindings/power/supply/qcom,pm4125-charger.yaml ✅ New file content matches lore patch exactly

Commit 2/3: FROMLIST: power: supply: qcom_smbx: Add PM4125 SMBLite charger support

Upstream commit: https://lore.kernel.org/all/20261126-smblite-charger-for-pm4125-v2-2-20656509518b@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream ✅ Subject matches lore patch (FROMLIST prefix added correctly)
Body preserves rationale ✅ Commit body identical to lore patch
Fixes tag present/correct N/A No Fixes tag in upstream or PR (new feature)
Authorship preserved ✅ From: matches lore author (Raj Aryan); both Signed-off-by lines present
Backport note (if applicable) N/A FROMLIST prefix used correctly for pending upstream patch

Diff

File Status Notes
drivers/power/supply/qcom_smbx.c ✅ Large driver extension (964 insertions, 112 deletions); context-adjusted for tree state

Commit 3/3: FROMLIST: arm64: dts: qcom: Add PM4125 charger node and shikra HS phy bridge

Upstream commit: https://lore.kernel.org/all/20261126-smblite-dt-v1-1-0f4f4401db3b@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream ✅ Subject matches lore patch (FROMLIST prefix added correctly)
Body preserves rationale ✅ Commit body identical to lore patch
Fixes tag present/correct N/A No Fixes tag in upstream or PR (new feature)
Authorship preserved ✅ From: matches lore author (Raj Aryan); all three Signed-off-by lines present (Raj Aryan, Krishna Kurapati, Rakesh Kota)
Backport note (if applicable) N/A FROMLIST prefix used correctly for pending upstream patch

Diff

File Status Notes
arch/arm64/boot/dts/qcom/pm4125.dtsi ✅ Charger node addition matches lore patch
arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts ✅ USB phy bridge changes match lore patch
arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi ✅ Charger enablement matches lore patch
arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts ✅ USB phy bridge changes match lore patch
arch/arm64/boot/dts/qcom/shikra.dtsi ✅ USB connector/port additions match lore patch

Issues

None. All three commits faithfully represent their upstream lore sources with correct FROMLIST prefixes, preserved authorship, and appropriate Link tags.


Verdict

Merge as-is. All three commits are faithful representations of their upstream lore patches with correct FROMLIST prefixes. The patches were posted to the mailing list on Nov 26, 2026 (today) and are under review. Context differences in line numbers and index hashes are expected and legitimate for FROMLIST patches applied to a different tree state.


Final Summary

  1. Lore link present: Yes — all three commits have correct Link tags pointing to their respective lore.kernel.org message-IDs

  2. Lore link matches PR commits: Yes — commit messages, authorship, and diff content are faithful to the lore sources; context-only differences in line numbers are expected for FROMLIST patches

  3. Upstream patch status: ⏳ Decision Pending — patches posted Nov 26, 2026; under review on linux-pm@vger.kernel.org, devicetree@vger.kernel.org, and linux-arm-msm@vger.kernel.org; no maintainer decision yet (patches are same-day fresh); automated bot review noted one minor issue on commit 3 (missing usb-role-switch property on shikra-cqs-evk)

  4. PR present in qcom-next/topics: Fail — per integration_presence_report.md: commit 1/3 is missing from both qcom-next and topics; commits 2/3 and 3/3 show partial evidence (subject or partial tree match) but full changes not verified in qcom-next or topics

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: 1843874b4356d1203ebd83d5ebfc24d45aa35f1d
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/3 [PATCH 1/3] FROMLIST: dt-bindings: power: supply: Add missing - no subject, patch-id, or full tree-content match found missing - no subject, patch-id, or full tree-content match found missing
2/3 [PATCH 2/3] FROMLIST: power: supply: qcom_smbx: Add PM4125 SMBLite partial - subject or partial tree evidence found, but full change was not verified missing - no subject, patch-id, or full tree-content match found partial
3/3 [PATCH 3/3] FROMLIST: arm64: dts: qcom: Add PM4125 charger node and partial - subject or partial tree evidence found, but full change was not verified missing - no subject, patch-id, or full tree-content match found partial

Final Status

overall_status: FAIL
present_commits: 0/3
partial_commits: 2/3
missing_commits: 1/3
topics_checked_for_commits: 3/3
final_summary: PR present in qcom-next/topics: Fail - 1/3 commit(s) are missing from both qcom-next and topics

@qlijarvis

Copy link
Copy Markdown

PR #1558 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ❌ 7 alignment style checks in commit 2/3
dt-binding-check ✅ Passed
dtb-check ❌ New properties not allowed by qusb2-phy binding
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ❌ Content mismatch in commit 3/3
tag-check ⚠️ Cannot verify (target branch unknown)

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1558 - Add PM4125 SMBLite charger support and Shikra HS phy bridge
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/45814380990

Checker Result Summary
checkpatch ❌ 7 alignment style checks in commit 2/3
dt-binding-check ✅ Passed
dtb-check ❌ New properties not allowed by qusb2-phy binding
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ❌ Content mismatch in commit 3/3
tag-check ⚠️ Cannot verify (target branch unknown)

❌ checkpatch

Root cause: Alignment style issues in drivers/power/supply/qcom_smbx.c — function call arguments not aligned with opening parenthesis.

Failure details:

Commit 06580f9224b3 ("FROMLIST: power: supply: qcom_smbx: Add PM4125 SMBLite charger support")

CHECK: Alignment should match open parenthesis
#851: FILE: drivers/power/supply/qcom_smbx.c:1236:
+	rc = smblite_write_jeita_16(chip,
+			SMBLITE_BATIF_BASE + SMBLITE_JEITA_COOL_THRESHOLD_CFG, soft[0]);

CHECK: Alignment should match open parenthesis
#856: FILE: drivers/power/supply/qcom_smbx.c:1241:
+	rc = smblite_write_jeita_16(chip,
+			SMBLITE_BATIF_BASE + SMBLITE_JEITA_WARM_THRESHOLD_CFG, soft[1]);

CHECK: Alignment should match open parenthesis
#861: FILE: drivers/power/supply/qcom_smbx.c:1246:
+	rc = smblite_write_jeita_16(chip,
+			SMBLITE_BATIF_BASE + SMBLITE_JEITA_COLD_THRESHOLD_CFG, hard[0]);

CHECK: Alignment should match open parenthesis
#866: FILE: drivers/power/supply/qcom_smbx.c:1251:
+	rc = smblite_write_jeita_16(chip,
+			SMBLITE_BATIF_BASE + SMBLITE_JEITA_HOT_THRESHOLD_CFG, hard[1]);

CHECK: Alignment should match open parenthesis
#1100: FILE: drivers/power/supply/qcom_smbx.c:1590:
+		rc = regmap_update_bits(chip->regmap,
+					 SMBLITE_CHGR_BASE + SMBLITE_CHGR_RECHG_CFG,

CHECK: Alignment should match open parenthesis
#1266: FILE: drivers/power/supply/qcom_smbx.c:1763:
+		rc = regmap_update_bits(chip->regmap,
+					 SMBLITE_CHGR_BASE + SMBLITE_CHARGING_ENABLE_CMD,

CHECK: Alignment should match open parenthesis
#1403: FILE: drivers/power/supply/qcom_smbx.c:1890:

06580f9224b3122bc1aeaac91e81d16dc029dcdc total: 0 errors, 0 warnings, 7 checks

Fix: Align continuation lines with the opening parenthesis. For example:

// Before:
rc = smblite_write_jeita_16(chip,
		SMBLITE_BATIF_BASE + SMBLITE_JEITA_COOL_THRESHOLD_CFG, soft[0]);

// After:
rc = smblite_write_jeita_16(chip,
			     SMBLITE_BATIF_BASE + SMBLITE_JEITA_COOL_THRESHOLD_CFG,
			     soft[0]);

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES \
  --git c6ebaba229f0e216b9d485f61aa50225bdc623cd..869f0b9c786f0a48874d31c5a0a2934952b91187

Fix command:

git rebase -i c6ebaba229f0   # mark commit 06580f9224b3 as 'edit'
# Fix alignment in drivers/power/supply/qcom_smbx.c
git add drivers/power/supply/qcom_smbx.c
git commit --amend --no-edit
git rebase --continue

❌ dtb-check

Root cause: The qcom,qusb2-phy binding schema does not allow ports or usb-role-switch properties, but commit 3/3 adds both to the phy@1613000 node in shikra.dtsi.

Failure details:

Log Summary: Test failed
arch/arm64/boot/dts/qcom/shikra-cqm-evk.dtb: phy@1613000 (qcom,shikra-qusb2-phy): 
  'ports', 'usb-role-switch' do not match any of the regexes: '^pinctrl-[0-9]+$'
	from schema $id: http://devicetree.org/schemas/phy/qcom,qusb2-phy.yaml

The PR adds these properties to the HS phy node in arch/arm64/boot/dts/qcom/shikra.dtsi:

 		usb_1_hsphy: phy@1613000 {
 			...
 			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					usb_1_hsphy_connector: endpoint {
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+					usb_1_hsphy_controller: endpoint {
+						remote-endpoint = <&usb_1_dwc3_hs>;
+					};
+				};
+			};
 		};

And in shikra-cqm-evk.dts:

 &usb_1_hsphy {
+	usb-role-switch;
 	status = "okay";
 };

Fix: Update the qcom,qusb2-phy binding YAML to allow these properties. The binding file is likely Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml. Add:

properties:
  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    description: |
      Graph port for USB role switching. Port 0 is the connector side,
      port 1 is the controller side.

  usb-role-switch:
    type: boolean
    description: |
      Indicates that the phy supports USB role switching.

Note: The commit message mentions "needed by the upcoming QUSB2 charger-detection work", suggesting this is preparatory work for a future feature. The binding update should be included in this series or submitted separately first.

Reproduce locally:

make -j$(nproc) O=out defconfig
make -j$(nproc) O=out CHECK_DTBS=y arch/arm64/boot/dts/qcom/shikra-cqm-evk.dtb

❌ check-patch-compliance

Root cause: Content mismatch between the PR commit and the upstream lore patch for commit 3/3.

Failure details:

Checking commit: FROMLIST: arm64: dts: qcom: Add PM4125 charger node and shikra HS phy bridge
Change is different from the one mentioned in Link

The commit references:

Link: https://lore.kernel.org/all/20261126-smblite-dt-v1-1-0f4f4401db3b@oss.qualcomm.com/

Analysis: The checker detected that the patch content in the PR differs from the upstream patch at the provided lore link. This could be due to:

  1. Context differences — The PR may be based on a different tree state than the upstream patch
  2. Additional changes — The PR may include extra hunks not in the upstream version
  3. Wrong link — The link may point to a different patch in the series (note: the link says "v1-1" suggesting patch 1/3, but this is commit 3/3)

Fix: Verify the content match:

# Fetch the upstream patch
b4 am --single-message -C -l -3 \
  https://lore.kernel.org/all/20261126-smblite-dt-v1-1-0f4f4401db3b@oss.qualcomm.com/ \
  -o /tmp/upstream

# Compare with PR commit
git format-patch -1 6be189ea01cd --stdout > /tmp/pr-commit.patch
diff -u /tmp/upstream/*.mbx /tmp/pr-commit.patch

Likely issue: The lore link appears to point to patch 1/3 of the series (v1-1), but this is commit 3/3. The correct link should be:

Link: https://lore.kernel.org/all/20261126-smblite-dt-v1-3-0f4f4401db3b@oss.qualcomm.com/

(Note the v1-3 instead of v1-1)

If the content genuinely differs from upstream (e.g., includes additional board enablement), document the differences in the commit message.


⚠️ tag-check

Status: Cannot verify — target branch information unavailable.

Note: The tag-check is mandatory for all branches except qcom-next and qcom-next-staging. All three commits in this PR use the FROMLIST: prefix, which is correct if:

  • The patches have been posted to a mailing list (lore.kernel.org)
  • The target branch requires subject prefixes

If the target branch is qcom-next or qcom-next-staging, this check does not apply.


Verdict

3 blockers must be fixed before merge:

  1. checkpatch — Fix 7 alignment style issues in drivers/power/supply/qcom_smbx.c (commit 2/3)
  2. dtb-check — Update qcom,qusb2-phy binding to allow ports and usb-role-switch properties, or split the DTS changes into a separate series that follows the binding update
  3. check-patch-compliance — Verify and fix the lore link in commit 3/3 (likely should be v1-3 not v1-1), or document content differences if intentional

Recommendation: The binding update for qcom,qusb2-phy should ideally be submitted as a separate patch (patch 4/4) in this series, or the DTS changes should be deferred until the binding is updated upstream. The current approach will cause dtbs_check failures.

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