From: "Rob Herring (Arm)" <robh@kernel.org>
To: Thomas Antoine <t.antoine@uclouvain.be>
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
"Alim Akhtar" <alim.akhtar@samsung.com>,
linux-pm@vger.kernel.org,
"Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Sebastian Reichel" <sre@kernel.org>,
linux-kernel@vger.kernel.org,
"Peter Griffin" <peter.griffin@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Dimitri Fedrau" <dima.fedrau@gmail.com>,
"André Draszik" <andre.draszik@linaro.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Will Deacon" <will@kernel.org>,
devicetree@vger.kernel.org,
"Catalin Marinas" <catalin.marinas@arm.com>
Subject: Re: [PATCH v3 0/5] Google Pixel 6 (oriole): max77759 fuel gauge enablement and driver support
Date: Mon, 21 Apr 2025 16:53:57 -0500 [thread overview]
Message-ID: <174527239330.2996733.2164044396415620097.robh@kernel.org> (raw)
In-Reply-To: <20250421-b4-gs101_max77759_fg-v3-0-50cd8caf9017@uclouvain.be>
On Mon, 21 Apr 2025 20:13:31 +0200, Thomas Antoine wrote:
> The Google Pixel 6 has a Maxim MAX77759 which provides a fuel gauge with
> an interface with a lot in common with the Maxim max1720x.
>
> Modify the Maxim MAX1720x driver to be compatible with the Maxim MAX77759
> and enable it for the gs101-oriole board.
>
> The voltage, current, capacity, temperature and charge have all been
> tested and show coherent results. The charge full design and capacity
> equal the ones seen on android, the ratio between average charge and
> average current does predict pretty accurately the time to empty under
> a constant workload and temperature is coherent with the dynamic state
> of the device.
>
> Health is not enabled as it always reports overheating. The time to empty
> is wrong by about a factor 2 and is thus also disabled.
>
> Signed-off-by: Thomas Antoine <t.antoine@uclouvain.be>
>
> ---
> Changes in v3:
> - Update base tree to avoid conflicts
> - Fix capacity computation for max1720x
> - Add separate properties for the max7759 to disable non-functional ones
> - Take TASKPERIOD into account for voltage computation of max77759
> - Simplify vcell computation (Dimitri Fedrau)
> - Switch has_nvmem to bool and keep it only in chip_data (Dimitri Fedrau)
> - Drop the yes_range from the write table (Sebastian Reichel)
> - Add test_power_supply_properties.sh to cover letter (Sebastian Reichel)
> - Switch back some changes to binding and actually use allOf:if: to
> restrict constraints (Krzysztof Kozlowski)
> - Fix style errors
> - Link to v2: https://lore.kernel.org/r/20250102-b4-gs101_max77759_fg-v2-0-87959abeb7ff@uclouvain.be
>
> Changes in v2:
> - Add fallback for voltage measurement (André Draszik)
> - Add regmap for the max77759 (André Draszik)
> - Add chip identification for the max77759 (André Draszik, Peter Griffin)
> - Move RSense value to a devicetree property shunt-resistor-micro-ohms
> (Dimitri Fedrau, André Draszik)
> - Use allOf:if to narrow binding per variant (Krzysztof Kozlowski)
> - Remove binding example (Krzysztof Kozlowski)
> - Change defconfig order to follow savedefconfig (Krzysztof Kozlowski)
> - Fix style errors
> - Link to v1: https://lore.kernel.org/r/20241202-b4-gs101_max77759_fg-v1-0-98d2fa7bfe30@uclouvain.be
>
> tools/testing/selftests/power_supply/test_power_supply_properties.sh:
> ok 1 max77759-fg.exists
> ok 2 max77759-fg.uevent.NAME
> ok 3 max77759-fg.sysfs.type
> ok 4 max77759-fg.uevent.TYPE
> ok 5 max77759-fg.sysfs.usb_type # SKIP
> ok 6 max77759-fg.sysfs.online # SKIP
> ok 7 max77759-fg.sysfs.present
> ok 8 max77759-fg.sysfs.status # SKIP
> ok 9 max77759-fg.sysfs.capacity
> ok 10 max77759-fg.sysfs.capacity_level # SKIP
> ok 11 max77759-fg.sysfs.model_name
> ok 12 max77759-fg.sysfs.manufacturer
> ok 13 max77759-fg.sysfs.serial_number # SKIP
> ok 14 max77759-fg.sysfs.technology # SKIP
> ok 15 max77759-fg.sysfs.cycle_count # SKIP
> ok 16 max77759-fg.sysfs.scope # SKIP
> ok 17 max77759-fg.sysfs.input_current_limit # SKIP(Dimitri Fedrau)
> ok 18 max77759-fg.sysfs.input_voltage_limit # SKIP
> ok 19 max77759-fg.sysfs.voltage_now
> ok 20 max77759-fg.sysfs.voltage_min # SKIP
> ok 21 max77759-fg.sysfs.voltage_max # SKIP
> ok 22 max77759-fg.sysfs.voltage_min_design # SKIP
> ok 23 max77759-fg.sysfs.voltage_max_design # SKIP
> ok 24 max77759-fg.sysfs.current_now
> ok 25 max77759-fg.sysfs.current_max # SKIP
> ok 26 max77759-fg.sysfs.charge_now # SKIP
> ok 27 max77759-fg.sysfs.charge_full
> ok 28 max77759-fg.sysfs.charge_full_design
> ok 29 max77759-fg.sysfs.power_now # SKIP
> ok 30 max77759-fg.sysfs.energy_now # SKIP
> ok 31 max77759-fg.sysfs.energy_full # SKIP
> ok 32 max77759-fg.sysfs.energy_full_design # SKIP
> ok 33 max77759-fg.sysfs.energy_full_design # SKIP
>
> ---
> Thomas Antoine (5):
> power: supply: correct capacity computation
> power: supply: add support for max77759 fuel gauge
> dt-bindings: power: supply: add max77759-fg flavor
> arm64: defconfig: enable Maxim max1720x driver
> arm64: dts: exynos: gs101-oriole: enable Maxim max77759 fuel gauge
>
> .../bindings/power/supply/maxim,max17201.yaml | 34 ++-
> .../boot/dts/exynos/google/gs101-pixel-common.dtsi | 10 +
> arch/arm64/configs/defconfig | 1 +
> drivers/power/supply/max1720x_battery.c | 271 ++++++++++++++++++---
> 4 files changed, 280 insertions(+), 36 deletions(-)
> ---
> base-commit: e48e99b6edf41c69c5528aa7ffb2daf3c59ee105
> change-id: 20241202-b4-gs101_max77759_fg-402e231a4b33
>
> Best regards,
> --
> Thomas Antoine <t.antoine@uclouvain.be>
>
>
>
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: using specified base-commit e48e99b6edf41c69c5528aa7ffb2daf3c59ee105
If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/exynos/' for 20250421-b4-gs101_max77759_fg-v3-0-50cd8caf9017@uclouvain.be:
arch/arm64/boot/dts/exynos/google/gs101-raven.dtb: fuel-gauge@36 (maxim,max77759-fg): reg: [[54]] is too short
from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-raven.dtb: fuel-gauge@36 (maxim,max77759-fg): reg-names: ['m5'] is too short
from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-raven.dtb: fuel-gauge@36 (maxim,max77759-fg): Unevaluated properties are not allowed ('reg-names' was unexpected)
from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-oriole.dtb: fuel-gauge@36 (maxim,max77759-fg): reg: [[54]] is too short
from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-oriole.dtb: fuel-gauge@36 (maxim,max77759-fg): reg-names: ['m5'] is too short
from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-oriole.dtb: fuel-gauge@36 (maxim,max77759-fg): Unevaluated properties are not allowed ('reg-names' was unexpected)
from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
prev parent reply other threads:[~2025-04-21 21:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 18:13 Thomas Antoine via B4 Relay
2025-04-21 18:13 ` [PATCH v3 1/5] power: supply: correct capacity computation Thomas Antoine via B4 Relay
2025-04-22 9:46 ` Dimitri Fedrau
2025-04-23 7:48 ` Thomas Antoine
2025-04-21 18:13 ` [PATCH v3 2/5] power: supply: add support for max77759 fuel gauge Thomas Antoine via B4 Relay
2025-04-22 18:48 ` Dimitri Fedrau
2025-04-23 8:02 ` Thomas Antoine
2025-04-30 0:36 ` Sebastian Reichel
2025-04-30 13:49 ` Thomas Antoine
2025-04-21 18:13 ` [PATCH v3 3/5] dt-bindings: power: supply: add max77759-fg flavor Thomas Antoine via B4 Relay
2025-04-22 10:05 ` Krzysztof Kozlowski
2025-04-23 8:05 ` Thomas Antoine
2025-04-23 13:45 ` Krzysztof Kozlowski
2025-04-30 13:51 ` Thomas Antoine
2025-04-21 18:13 ` [PATCH v3 4/5] arm64: defconfig: enable Maxim max1720x driver Thomas Antoine via B4 Relay
2025-04-21 18:13 ` [PATCH v3 5/5] arm64: dts: exynos: gs101-oriole: enable Maxim max77759 fuel gauge Thomas Antoine via B4 Relay
2025-04-21 21:53 ` Rob Herring (Arm) [this message]
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=174527239330.2996733.2164044396415620097.robh@kernel.org \
--to=robh@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=andre.draszik@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dima.fedrau@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=sre@kernel.org \
--cc=t.antoine@uclouvain.be \
--cc=tudor.ambarus@linaro.org \
--cc=will@kernel.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
all inboxes | Powered by JetHome®