[RFC v2 0/4] power: supply: Add Support for RK817 Charger

Peter Geis pgwipeout at gmail.com
Wed Jul 28 05:57:52 PDT 2021


On Mon, Jul 26, 2021 at 3:02 PM Chris Morgan <macroalpha82 at gmail.com> wrote:
>
> From: Chris Morgan <macromorgan at hotmail.com>
>
> As this is my first charger driver, I'm submitting it as an RFC so I
> can get input from the community on what else is needed to make the
> driver consistent with the quality upstream expects.
>
> This series is to add support for the Rockchip rk817 battery charger
> which is present in all Rockchip RK817 PMICs. The driver was written
> as a joint effort by Maya Matuszczyk <maccraft123mc at gmail.com> and
> myself Chris Morgan <macromorgan at hotmail.com>.
>
> The driver requires some basic parameters be described about the
> battery in the devicetree such as the maximum capacity, the minimum
> and maximum voltage for the battery, the maximum charge current, the
> maximum charge voltage, and the value of sample resistors and sleep
> currents.
>
> The hardware itself contains an ADC capable of measuring the voltage,
> current, and temperature of the battery (though my implementation of an
> Odroid Go Advance lacks a thermistor for temperature). It also contains
> a columb counter, registers for tracking the measured voltage and
> current at boot, and a few bytes of nvram for storing data.

Feel free to add my Tested-by: Peter Geis <pgwipeout at gmail.com>

Tested on the Pine64 Quartz64 Model A.
We can't go as low on the battery voltage, otherwise the SOC becomes
unstable before it can shut down.
<3625000 0> seems sufficient for us though (adding this for the
benefit of anyone else testing).

Voltages are accurate as measured at the battery.
Are there plans to expose the thermal sensor (if that's possible)?

>
> Changes from V1:
>
>  - Fixed a CLANG warning regarding an uninitalized variable.
>  - Fixed a CLANG warning regarding a pointer as a bool value always
>    returning as true.
>  - Added Maya Matuszczyk to the Signed-off-by.
>
> Chris Morgan (4):
>   [RFC v2 1/4] dt-bindings: Add Rockchip rk817 battery charger support
>   [RFC v2 2/4] mfd: Add Rockchip rk817 battery charger support
>   [RFC v2 3/4] power: supply: Add charger driver for Rockchip RK817
>   [RFC 4/4] arm64: dts: rockchip: add rk817 charger to Odroid Go Advance
>
>  .../devicetree/bindings/mfd/rk808.txt         |  35 +-
>  .../boot/dts/rockchip/rk3326-odroid-go2.dts   |  25 +
>  drivers/mfd/rk808.c                           |  16 +-
>  drivers/power/supply/Kconfig                  |   6 +
>  drivers/power/supply/Makefile                 |   1 +
>  drivers/power/supply/rk817_charger.c          | 932 ++++++++++++++++++
>  include/linux/mfd/rk808.h                     |  87 ++
>  7 files changed, 1099 insertions(+), 3 deletions(-)
>  create mode 100644 drivers/power/supply/rk817_charger.c
>
> --
> 2.25.1
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip



More information about the Linux-rockchip mailing list