From: sashiko-bot@kernel.org
To: "Raj Aryan" <raj.aryan@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, mfd@lists.linux.dev, robh@kernel.org,
conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: power: supply: Add qcom,pm4125-charger
Date: Thu, 26 Nov 2026 11:10:03 +0000 [thread overview]
Message-ID: <sashiko-outbox-235333@kernel.org> (raw)
In-Reply-To: <20261126-smblite-charger-for-pm4125-v2-1-20656509518b@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] dt-bindings: power: supply: raw ADC register values in JEITA
properties
- [Medium] dt-bindings: power: supply: pm4125 reg and IRQ claims
contradict schema
--
commit 57cf825c23ab90280bb771024041e96a79554ade
Author: Raj Aryan <raj.aryan@oss.qualcomm.com>
dt-bindings: power: supply: Add qcom,pm4125-charger
This commit adds a Devicetree binding schema for the Qualcomm PM4125
SMBLite switch-mode battery charger and references it from
qcom,spmi-pmic.yaml.
> diff --git a/Documentation/devicetree/bindings/power/supply/qcom,pm4125-charger.yaml b/Documentation/devicetree/bindings/power/supply/qcom,pm4125-charger.yaml
> new file mode 100644
> index 0000000000000..4c88d836355b4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/qcom,pm4125-charger.yaml
> @@ -0,0 +1,119 @@
[ ... ]
> +description: |
> + The Qualcomm SMBLite is a switch-mode battery charger IP found on
> + the entry-level Qualcomm PM4125 PMIC. It exposes five separate
> + SPMI peripheral bases for CHGR, DCDC, USB, MISC and BATIF blocks and
> + supports USB input current limiting, JEITA temperature protection,
> + battery overvoltage detection and a hardware watchdog.
> +
> +properties:
> + compatible:
> + const: qcom,pm4125-charger
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 4
> +
> + interrupt-names:
> + items:
> + - const: usb-plugin
> + - const: bat-ov
> + - const: wdog-bark
> + - const: usbin-icl-change
[Severity: Medium]
Does this schema match the commit message and description claims for why
qcom,pmi8998-charger.yaml cannot be reused?
The description and commit message state that PM4125 SMBLite exposes five
separate SPMI peripheral bases and a different interrupt set from SMB2 on
PMI8998/PM660. However, this schema defines a single reg entry (0x1000,
matching SMB2 where the sub-blocks sit at fixed 0x100 offsets from 0x1000)
and the exact same four base interrupt-names in the same order as
qcom,pmi8998-charger.yaml (where chg-state-change is optional via
minItems: 4). pm4125_adc in arch/arm64/boot/dts/qcom/pm4125.dtsi also
defines both ADC5_USB_IN_I and ADC5_USB_IN_V_16, matching the usbin_i and
usbin_v channels in qcom,pmi8998-charger.yaml.
[ ... ]
> + monitored-battery: true
> +
> + qcom,jeita-soft-thresholds:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + items:
> + - description: COOL threshold as a raw ADC comparator value.
> + maximum: 0xffff
> + - description: WARM threshold as a raw ADC comparator value.
> + maximum: 0xffff
> + description: |
> + JEITA soft temperature thresholds (COOL, WARM) as raw 16-bit ADC
> + comparator values written to the BATIF ADC comparator registers.
> + Example: <0x5314 0x25e3> for COOL=15°C, WARM=45°C.
> +
> + qcom,jeita-hard-thresholds:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + items:
> + - description: COLD threshold as a raw ADC comparator value.
> + maximum: 0xffff
> + - description: HOT threshold as a raw ADC comparator value.
> + maximum: 0xffff
> + description: |
> + JEITA hard temperature thresholds (COLD, HOT) as raw 16-bit ADC
> + comparator values written to the BATIF ADC comparator registers.
> + Example: <0x58cd 0x20b8> for COLD=0°C, HOT=60°C.
[Severity: Medium]
As reported by Krzysztof Kozlowski on v1 [1], should these JEITA
temperature thresholds be expressed in standard physical units rather than
raw 16-bit ADC comparator register values?
Encoding raw BATIF register values in qcom,jeita-soft-thresholds and
qcom,jeita-hard-thresholds bakes hardware register encoding into the
Devicetree ABI. Since this binding already includes monitored-battery,
the soft (COOL, WARM) and hard (COLD, HOT) limits can use the standard
alert-celsius and operating-range-celsius properties from battery.yaml and
be converted to ADC comparator codes in the driver (for example via
qcom_adc_tm5_temp_volt_scale()).
[1] https://lore.kernel.org/r/a5f859c1-0779-4ae1-88f0-bfa12268e09c@kernel.org
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126-smblite-charger-for-pm4125-v2-0-20656509518b@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-11-26 11:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 11:00 [PATCH v2 0/2] power: supply: Add SMBLite charger support for PM4125 Raj Aryan
2026-11-26 11:00 ` [PATCH v2 1/2] dt-bindings: power: supply: Add qcom,pm4125-charger Raj Aryan
2026-11-26 11:10 ` sashiko-bot [this message]
2026-11-26 11:00 ` [PATCH v2 2/2] power: supply: qcom_smbx: Add PM4125 SMBLite charger support Raj Aryan
2026-11-26 11:18 ` sashiko-bot
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=sashiko-outbox-235333@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee@kernel.org \
--cc=mfd@lists.linux.dev \
--cc=raj.aryan@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.