devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Add Battery and USB Supply for AXP717
@ 2024-06-17 22:05 Chris Morgan
  2024-06-17 22:05 ` [PATCH 1/8] dt-bindings: iio: adc: Add AXP717 compatible Chris Morgan
                   ` (7 more replies)
  0 siblings, 8 replies; 29+ messages in thread
From: Chris Morgan @ 2024-06-17 22:05 UTC (permalink / raw)
  To: linux-sunxi
  Cc: linux-pm, devicetree, linux-iio, broonie, lee, samuel,
	jernej.skrabec, sre, wens, conor+dt, krzk+dt, robh, lars,
	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.

Please note that this patch series relies on the following series being
applied first [1].

[1]: https://lore.kernel.org/linux-sunxi/20240418000736.24338-1-andre.przywara@arm.com/

Chris Morgan (8):
  dt-bindings: iio: adc: Add AXP717 compatible
  power: supply: axp20x_usb_power: Add support for AXP717
  power: supply: axp20x_battery: add support for AXP717
  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 |  10 +
 .../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                  | 167 ++++-
 drivers/mfd/axp20x.c                          |  30 +-
 drivers/power/supply/axp20x_battery.c         | 580 ++++++++++++++++--
 drivers/power/supply/axp20x_usb_power.c       | 350 +++++++++--
 drivers/regulator/axp20x-regulator.c          |   2 +-
 include/linux/mfd/axp20x.h                    |  26 +-
 10 files changed, 1102 insertions(+), 97 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [PATCH 6/8] power: supply: axp20x_usb_power: Add support for AXP717
@ 2024-06-22 19:42 Philippe Simons
  0 siblings, 0 replies; 29+ messages in thread
From: Philippe Simons @ 2024-06-22 19:42 UTC (permalink / raw)
  To: macroalpha82
  Cc: broonie, conor+dt, devicetree, jernej.skrabec, krzk+dt, lars, lee,
	linux-iio, linux-pm, linux-sunxi, macromorgan, robh, samuel, sre,
	wens

sysfs correctly reports presence of USB power and voltages, tested on
RG35XX-H (H700)

Tested-by: Philippe Simons <simons.philippe@gmail.com>

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

end of thread, other threads:[~2024-07-30 19:38 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 22:05 [PATCH 0/8] Add Battery and USB Supply for AXP717 Chris Morgan
2024-06-17 22:05 ` [PATCH 1/8] dt-bindings: iio: adc: Add AXP717 compatible Chris Morgan
2024-06-18  6:41   ` Krzysztof Kozlowski
2024-06-23  5:17   ` Chen-Yu Tsai
2024-06-17 22:05 ` [PATCH 2/8] power: supply: axp20x_usb_power: Add support for AXP717 Chris Morgan
2024-06-18  6:40   ` Krzysztof Kozlowski
2024-06-23  5:02   ` Chen-Yu Tsai
2024-06-17 22:05 ` [PATCH 3/8] power: supply: axp20x_battery: add " Chris Morgan
2024-06-18  6:41   ` Krzysztof Kozlowski
2024-06-23  5:05   ` Chen-Yu Tsai
2024-06-17 22:05 ` [PATCH 4/8] mfd: axp20x: Add ADC, BAT, and USB cells " Chris Morgan
2024-06-20 17:25   ` Lee Jones
2024-06-23  5:55   ` Chen-Yu Tsai
2024-06-17 22:05 ` [PATCH 5/8] iio: adc: axp20x_adc: add support for AXP717 ADC Chris Morgan
2024-06-23  5:27   ` Chen-Yu Tsai
2024-07-30 19:11     ` Chris Morgan
2024-06-23 16:30   ` Jonathan Cameron
2024-06-17 22:05 ` [PATCH 6/8] power: supply: axp20x_usb_power: Add support for AXP717 Chris Morgan
2024-06-22 23:49   ` Ryan Walklin
2024-06-23  5:42   ` Chen-Yu Tsai
2024-07-30 19:14     ` Chris Morgan
2024-06-24 18:00   ` Philippe Simons
2024-06-17 22:05 ` [PATCH 7/8] power: supply: axp20x_battery: add " Chris Morgan
2024-06-22 23:51   ` Ryan Walklin
2024-06-23  6:19   ` Chen-Yu Tsai
2024-07-30 19:38     ` Chris Morgan
2024-06-24 17:56   ` Philippe Simons
2024-06-17 22:05 ` [PATCH 8/8] arm64: dts: allwinner: h700: Add charger for Anbernic RG35XX Chris Morgan
  -- strict thread matches above, loose matches on Subject: below --
2024-06-22 19:42 [PATCH 6/8] power: supply: axp20x_usb_power: Add support for AXP717 Philippe Simons

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).