linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 00/15] Add Battery and USB Supply for AXP717
@ 2024-08-02 19:20 Chris Morgan
  2024-08-02 19:20 ` [PATCH V2 01/15] iio: adc: axp20x_adc: Add adc_en1 and adc_en1 to axp_data Chris Morgan
                   ` (14 more replies)
  0 siblings, 15 replies; 26+ messages in thread
From: Chris Morgan @ 2024-08-02 19:20 UTC (permalink / raw)
  To: linux-sunxi
  Cc: linux-pm, linux-arm-kernel, devicetree, linux-iio, quentin.schulz,
	mripard, tgamblin, aidanmacdonald.0x0, u.kleine-koenig, lee,
	samuel, jernej.skrabec, sre, wens, conor+dt, krzk+dt, robh, lars,
	jic23, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support for monitoring the USB charger and battery charger on the
AXP717 PMIC. This required some driver refactoring of the axp20x USB
and battery charger as the AXP717 is somewhat different but can still
benefit from some common elements.

Note that as of now the charging current now value may be incorrect as
the scale and offsets were not documented in the datasheet. I suspect
the scale is 1 and the offset is somewhere around 450mA though.

Changes from V1:
 - Refactored against mainline to remove BOOST pre-requisite.
 - Corrected commit subjects for DT bindings.
 - Split refactoring and AXP717 support into different patches.
 - Added IRQ for VBUS over voltage. There appears to be a bug
   with the VBUS fault IRQ because it is assigned IRQ num 0.
 - Corrected battery driver to report POWER_SUPPLY_PROP_VOLTAGE_MIN
   and POWER_SUPPLY_PROP_VOLTAGE_MAX instead of *_DESIGN.

Chris Morgan (15):
  iio: adc: axp20x_adc: Add adc_en1 and adc_en1 to axp_data
  power: supply: axp20x_battery: Remove design from min and max voltage
  power: supply: axp20x_battery: Make iio and battery config per device
  power: supply: axp20x_usb_power: Make VBUS and IIO config per device
  dt-bindings: power: supply: axp20x: Add input-current-limit-microamp
  power: supply: axp20x_usb_power: add input-current-limit-microamp
  dt-bindings: power: supply: axp20x-battery: Add monitored-battery
  dt-bindings: iio: adc: Add AXP717 compatible
  dt-bindings: power: supply: axp20x: Add AXP717 compatible
  dt-bindings: power: supply: axp20x: Add AXP717 compatible
  mfd: axp20x: Add ADC, BAT, and USB cells for AXP717
  iio: adc: axp20x_adc: add support for AXP717 ADC
  power: supply: axp20x_usb_power: Add support for AXP717
  power: supply: axp20x_battery: add support for AXP717
  arm64: dts: allwinner: h700: Add charger for Anbernic RG35XX

 .../bindings/iio/adc/x-powers,axp209-adc.yaml |  12 +
 .../x-powers,axp20x-battery-power-supply.yaml |   7 +
 .../x-powers,axp20x-usb-power-supply.yaml     |   6 +
 .../sun50i-h700-anbernic-rg35xx-2024.dts      |  21 +
 drivers/iio/adc/axp20x_adc.c                  | 182 +++++-
 drivers/mfd/axp20x.c                          |  25 +-
 drivers/power/supply/axp20x_battery.c         | 597 ++++++++++++++++--
 drivers/power/supply/axp20x_usb_power.c       | 353 ++++++++++-
 include/linux/mfd/axp20x.h                    |  27 +
 9 files changed, 1132 insertions(+), 98 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-08-17 10:01 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-02 19:20 [PATCH V2 00/15] Add Battery and USB Supply for AXP717 Chris Morgan
2024-08-02 19:20 ` [PATCH V2 01/15] iio: adc: axp20x_adc: Add adc_en1 and adc_en1 to axp_data Chris Morgan
2024-08-03 10:58   ` Jonathan Cameron
2024-08-02 19:20 ` [PATCH V2 02/15] power: supply: axp20x_battery: Remove design from min and max voltage Chris Morgan
2024-08-02 19:20 ` [PATCH V2 03/15] power: supply: axp20x_battery: Make iio and battery config per device Chris Morgan
2024-08-02 19:20 ` [PATCH V2 04/15] power: supply: axp20x_usb_power: Make VBUS and IIO " Chris Morgan
2024-08-02 19:20 ` [PATCH V2 05/15] dt-bindings: power: supply: axp20x: Add input-current-limit-microamp Chris Morgan
2024-08-04 15:37   ` Krzysztof Kozlowski
2024-08-02 19:20 ` [PATCH V2 06/15] power: supply: axp20x_usb_power: add input-current-limit-microamp Chris Morgan
2024-08-02 19:20 ` [PATCH V2 07/15] dt-bindings: power: supply: axp20x-battery: Add monitored-battery Chris Morgan
2024-08-04 15:38   ` Krzysztof Kozlowski
2024-08-02 19:20 ` [PATCH V2 08/15] dt-bindings: iio: adc: Add AXP717 compatible Chris Morgan
2024-08-03 10:59   ` Jonathan Cameron
2024-08-02 19:20 ` [PATCH V2 09/15] dt-bindings: power: supply: axp20x: " Chris Morgan
2024-08-04 15:38   ` Krzysztof Kozlowski
2024-08-02 19:20 ` [PATCH V2 10/15] " Chris Morgan
2024-08-04 15:38   ` Krzysztof Kozlowski
2024-08-02 19:20 ` [PATCH V2 11/15] mfd: axp20x: Add ADC, BAT, and USB cells for AXP717 Chris Morgan
2024-08-02 19:20 ` [PATCH V2 12/15] iio: adc: axp20x_adc: add support for AXP717 ADC Chris Morgan
2024-08-03 11:00   ` Jonathan Cameron
2024-08-02 19:20 ` [PATCH V2 13/15] power: supply: axp20x_usb_power: Add support for AXP717 Chris Morgan
2024-08-02 19:20 ` [PATCH V2 14/15] power: supply: axp20x_battery: add " Chris Morgan
2024-08-03 11:10   ` Jonathan Cameron
2024-08-14 21:13     ` Chris Morgan
2024-08-17  9:59       ` Jonathan Cameron
2024-08-02 19:20 ` [PATCH V2 15/15] arm64: dts: allwinner: h700: Add charger for Anbernic RG35XX Chris Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).